Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing 3 PageFooters Based on Presence of Associated Sections 1

Status
Not open for further replies.
Aug 2, 2005
31
US
Folks..

I am trying print page footers based on the presence of subreport section in the main report. CR 8.5 on Sybase. I have 3 page footers.

Page Footer_a = will print when subreport_a is printed

Page footer_b = will print when main report is printed

Page footer_c = will print when subreport_b is printed

And other combinations and expected results are:

subreport_a and main report is printed, then footer_a & b will print

subreport_a & b printed, then footer_a & c will print

main page & subreport_c, then footer_b & c will print, or

subreport_a & b & main printed, then all footers will print respectively.


General information about the report itself are:

> Based on sections printed, footers has different information on them that need to be printed because the sections are printing.
>> Page numbers for the sections must carry over to other footers
>>> printing of these sections is controlled from the applications , hence which section prints is controlled by the user with a value written to the db to indicate that section is requested to print.
>>>> subreport_a is embedded in Virtual Group Header1 (number of pages that the subreport will span is unknown)
>>>>> subreport_b is embedded in Report footer (number of pages is Fixed - always 5 pages)

So far, there is no issue with page numbering. I am having problem with the page footers suppressing after their sections is done printing on the report.

A quick thoughts on this issue will be appreciated. Thanks all.
 
You can control the printing of the page footers by using variables, which you'll set PRIOR to each section of interest.

So you would right click each section that the subreport is in and select insert section below twice, and place the subreport in the "B" section, and place a formula in the "A" section, such as:

whileprintingrecord;
booleanvar Sub1Suppress:= False
booleanvar MainSuppress:= true

And in the "C" section place:

whileprintingrecord;
booleanvar Sub1Suppress:= True

Then in the suppress formula for the appropriate page footers use the corresponding variables, as in:

whileprintingrecord;
booleanvar MainSuppress

whileprintingrecord;
booleanvar Sub1Suppress

whileprintingrecord;
booleanvar Sub2Suppress

-k
 
sv, It works just fine. Thanks so much. I spent several hours trying to fix this issue. Only modification I did here was to suppress the variables and on the sections, suppress blank pages. You deserve a * for this. I will send one your way, and could we put this together in a FAQ area? Thanks again.
-b
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top