Print Page | Close Window

Conditional underlay or section suppress

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22920
Printed Date: 05 May 2024 at 1:47pm


Topic: Conditional underlay or section suppress
Posted By: brain
Subject: Conditional underlay or section suppress
Date Posted: 27 Jan 2021 at 2:23am
I inherited an invoice report with this design:

1. Prints a single invoice header with a subreport containing multiple line items. Header will print gain on a second page if there are enough line items in the subreport to spill over to a second page.
2. Page Header se to Underlays Following Sections in order to provide box around the subreport records above.

Now I have been asked to add a subreport that must be on an additional page. This new subreport will not have data for all invoices, so I need to suppress the additional page if blank. They originally told me the report would always be a single invoice only, so I put the new subreport in the report footer, suppressed the footer if blank, and suppressed the page header on the last page. That allowed the new subreport to be on a page of its own without the page header overlaying it..

Now they want to be able to print invoices in batches, and that requires interleaving that subreport after each invoice header page. Because my current design had the new subreport in the footer, it shows the additional page only after the last invoice. If it were not for the underlay, I think I could just put my new subreport in Details B and force a new page. But the underlay means that everything, including details B, is underlaid by the header. I need to ensure that the page header appears once for each invoice but is suppressed on any second page having the additional data. Unlike the invoice header, which can have multiple pages, the extra page is never more than one page.

So my logic needs to be this:

1. Show page header only on pages having data in subreport #1. This will be one or more pages per invoice.
2. Show subreport #2 on a separate page, suppressing the page & report if blank.

Alternatively, I figure I can do something like this: put Subreport #2 in Details B and suppress just the underlay when subreport #2 has data. But I still have to put it on a new page from Details A.

Describing that is a very different matter from figuring out how to do it.



Print Page | Close Window