I'm using Crystal Reports to generate a report. This has a sub Report, where I need to add a color function to a section.
I did as follows:
In the sub report.
Right click on the > Section Expert > Color Tab
if RecordNumber = 1 then crBlue else
if RecordNumber = 2 then crRed else
crNoColor
Well, the goal is to present the first item in blue, the second in red and the next without color.
If this function were in some section in the Main Report it would work perfectly (I already tested), but the sub report does not work.
Only the first item receives the color (blue), but the second is left without color.
The sub report has been inserted in the report footer section main.
I believe that RecordNumber
has received 1
because of the section in which the sub report is in the Main Report.
Crystal Reports Details:
DLL: CrystalDecisions.CrystalReports.Engine Description: Crystal Reports for .NET Framework Runtime Version: v2. 0.50727
Version: 13.0.2000.0