Over the last couple of weeks I have been asked a number of times by clients "How Do I Highlight the First x Number of Records in a Group Report in Crystal Reports 2008?"
Solution:
There are a number of methods of doing this, but the key thing is to get the record number to reset to 0 at the begining of each group.
To highlight the First x Number of records per group:
- Create a Parameter Field, that asks the user the number of records to be highlighted
- Create a Running Total Feld that counts the number of records per group and resets the count to zero when a new group starts.
- From the Report menu select the Section Expert menu option
- In the Section Expert dialog box, select the Details section
- Click on the Color Tab
- Press the Conditional format button(X + 2)
- In the Formula Workshop enter the following formula:
IF {#Running Total Field} <= {?Parameter Field} THEN Color (192,254 ,37 ) ELSE crNoColor
- Press the Save & Close Button
- Press the OK button
If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us
|