0

Similar to the following posts:

show only in the first row in crystal reports details section

I'm relatively new to Crystal Reports and am still familiarising myself with it.

I have a Sub Report that displays all lines with Key X where Condition Y is met. I would like to only display the FIRST dataset.

Is there an easy solution to this?

I'm using SAP Crystal Reports 2013

Currently it appears as:

Key
 A
Subreport
 A1
 A2
 A3

Key 
 B
Subreport
 B1
 B2
 B3

What I want is:

Key
 A
Subreport
 A1

Key 
 B
Subreport
 B1

1 Answers1

0

In your sub report create a new running total in section: Running Total Fields. Set the type of summary to: count Name it: counter

Place this in the details section on the report canvas and see that it works. This will give you a running counter for every row. 1,2,3,4,5 etc

Right click the Details section and click on: Section Expert

Then click on Suppress X-2 formula icon:

Here you could simply add: {#counter} > 1

This will now suppress all rows of data where your new counter > 1

Let us know how it goes and please mark as answered to close out the case.

Note: If you have many rows of data in your sub reports then it would be more efficient to create a SQL Command instead of adding your tables. In the SQL command you could limit the data via pure SQL code. However, if you just have a small data set then the above solution is fine.

APB Reports
  • 985
  • 10