When using Crystal report groups, Crystal automatically adds the groups created to the sort order. As a result, additional sort criteria can only be added at the end of the group sort records. This poses a problem when the report requires groups to have additional sort criteria such as company name, then last name. There are two ways to circumvent this issue.
The first way is to create formulas that contain all the data you wish to sort on. In the example above, you would create a formula that contains EV870_COMPANY & EV870_LAST_NAME. Then the group would be created using this formula instead of the table fields. The drawback of this method is that future editors of the report will have to investigate the formulas to see when data is being used instead of looking at the field being group on.
The second method is to create "dummy" groups within your main groups. Using the same example, you would create a group for EV870_COMPANY, then a second group for EV870_LAST_NAME. The group for EV870_COMPANY would be suppressed to keep it from displaying on your report and all the header data would be entered into EV870_LAST_NAME. The drawback to this method is that the report could contain a large number of groups if you are using very complex grouping and sorting.
The ideal method is to use a mix of the above choices to create a report that both groups and sorts as desired, but is not too complex for future editors to follow.
Comments
0 comments
Please sign in to leave a comment.