Search code examples
crystal-reports

Print more than one row in Crystal Report


I am getting the data of the report from a DataSet. There is a particular Table (Players) which has more than one row. This table only has two columns: HeadLinePlayer and SubstitutePlayer. If a player started the match as a headline, his name is stored in a Row in the column HeadLinePlayer, and the other column remains empty.

Then, I want to first print all the players which were headline, and then all the players which were substitutes.

The result would be something like this:

HEADLINE Michael Jhon Peter

SUBSTITUTES Walt Mike

How can I do this?


Solution

  • You will ned to use subreports to achieve this. Create two subreports, one for HeadLinePlayers and one for SubstitutePlayer. Do not link anything. In the reports you only put the HeadLinePlayer or SubstitutePLayer into the detail field. Put your field headings into the Report Header (it should get created automatically) and suppress everyhting else in the subreports. Then in the main report create a second Detail section. Put one subreport in Detail Section a, the other one in Detail Section b. It will list all records for the first subreport, then all teh records for the second subreport.