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

No comments:

Post a Comment