Friday, 20 September 2013

Access SQL Server using Public IP


If we have Public IP (100.200.105.205) we can access sql server over internet.

First we need to run the sql browser services, then, enable TCP/IP in sql configuration tool.

Images from
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx

SQL Server 2008: Protocols for MSSQLServer

then we need to give the port number 1433
SQL Server 2008: TCP/IP Properties

we need to add 1433 port in external firewall (if we using) and in windows firewall
Microsoft Windows 7 Firewall with Advanced Security

New Inbound Rule Wizard - Protocols and Ports
New Inbound Rule Wizard - Protocols and Ports
New Inbound Rule Wizard - Action
New Inbound Rule Wizard - Profile
New Inbound Rule Wizard - Name





After this ,
we can access sql server using public ip without instance name.

if we using OLEDB connection type, we need to give the port number also.
 it looks like xxx.xxx.xxx.xxx,1433




 

Tuesday, 17 September 2013

Sort Control in Crystal Reports 2008?

Source:
http://www.maximumimpactsolutions.co.uk/blog/comments.asp?bd=149

In Crystal Reports 2008, a new feature, the Sort Control, has been added
The Sort Control, not only allows the end-user to sort the report by a number of fields, but also in ascending and descending order.

There are two ways that the sort control can be added to a report:

  • Directly added to the report, or
  • Assigned to a field heading of the report

Solutions:

To add a sort control directly to the report:
  1. Create the required report
  2. From the report menu, select the Record Sort Expert option
  3. In the Record Sort Expert dialog box, add the required fields for the sort controls:

    Crystal Reports 2008 Record Sort Expert dialog box
  4. Press the OK button
  5. From the Insert menu, select the Sort Control option
  6. In the Sort Control dialog box, select the required field:

    Crystal Reports 2008 Sort Control dialog box
  7. Press the OK button
  8. Click and drag on the in the required report section, to draw the Sort Control
  9. Double Click on the sort conrtol text box, to enter the label for the conrtol
  10. Click anywhere on the report to exit
  11. Press the Up or Down sort control button to sort the report


To attach a Sort Control to a Report Field:
  1. Create the required report
  2. From the report menu, select the Record Sort Expert option
  3. In the Record Sort Expert dialog box, add the required fields for the sort controls
  4. Press the OK button
  5. Right click on the field heading object, select the Bind Sort Control option
  6. In the Sort Control dialog box, select the required field:

    Crystal Reports 2008 Bind Sort Control dialog box

  7. Press the OK button
  8. Press the Up or Down sort control button to sort the report