Crystal Report: skip page if detail section is null

798 Views Asked by At

I have a subreport to filter the processing of specific products within a selected week set by the user. The subreport has 5 groups section and a detail section. Specifically, the groups filter the data like this:

  • Group1: filters the starting date of the process

  • Group2: filters the products' group

  • Group3: filters the products' code

  • Group4: filters the products' number

  • Group5: filters the products' sub-number

I use group1 section for writing some simple text. In the detail section, I put some fields. Now when I have no record in the detail section, the sub-report prints the text of group1. For example, because in the day of the print there isn't any processing work.

How can I skip the page if the detail section has no records? (Or perhaps it is necessary to suppress the group1?)

2

There are 2 best solutions below

1
On

Try to right click on the section, go to section expert, and check suppress blank section. This should hide the section if there are no values for that particular day

0
On

You should try supressing the group 1 if the details section is null. I'm not sure that you can actually skip a page.

If you are wondering how to know if the details section is null, maybe using a shared variable inside that section, which will count how many records will be inside the details section, to be used in the supression formula for the group 1.