Crystal Report – two detail sections each showing their own subset of data

crystal-reports

Is it possible to have a Crystal Report with two detail sections with each showing a subset of the results returned from the SP that the report is linked to?

For example in DetailA I want the records where FieldA in (a,b,c) and in DetailB I want records where FieldA in (d,e,f)

I know there is the Select Expert that can be used but that seems to work across the whole report rather than each individual detail section

It would be nice if I didn't need to create formulas as there are about 20 fields in the detail sections. Is there some kind of master formula that can be applied to the detail section as a whole?

Best Answer

You can do this pretty simply by just setting up your two Details sections the way that you want and placing all of the records' fields you want to display in each. Then, add a suppression formula to each of the Details sections. You can access the suppression formulas of each section by right-clicking that section, choosing 'Section Expert', and then clicking the formula button next to 'Suppress (No Drill-Down)'

Detail Section A: not({table.fieldA} in ['a','b','c'])

Detail Section B: not({table.fieldA} in ['d','e','f'])

Now, your Details A section will only display when the record is of type a, b, or c and your Details B section will only display when the record is of type d, e, or f.

Related Topic