crystal-reportssubreportcrystal-reports-2016

Can you row count in crystals to choose where to display data?


Is it possible to use count() in crystals to decide if a sub-report should display data in the original page or on a new page? Basically right now I have report with a sub-report and if the sub report has more than a certain number of rows then I need all of the rows to be on a separate page.

Thanks for your help.


Solution

  • You could use a SQL Expression Field to count the rows that will appear in your sub-report. Then you could use the result of this SQL Expression Field in the evaluation of a formula of the New Page Before property of the section that displays your sub-report. This property is found in the Section Expert, Paging tab if you are not familiar with it.