Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove Footer if nothing to print
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Remove Footer if nothing to print
Miscellaneous
Thread ID:
01686945
Message ID:
01686945
Views:
84
Hello,

I may have asked this question before. But now I am rephrasing it to see if maybe someone can suggest a solution.

I have a report - a work order - that has a footer section, as follows:
iif( type( "cFooterLine1")="U","",cFooterLine1)
iif( type( "cFooterLine2")="U","",cFooterLine2)
The value in the variables cFooterLine1 and cFooterLine2 is set in the .PRG that prints this report. The value is set based on the XML files, Footer_1.xml, Footer_2.xml
In most cases, the files Footer_1.xml and Footer_2.xml are not present. So the value of cFooterLine1 and cFooterLine2 should be set to "U" or an empty string. Therefore, the footer should have NOTHING to print. In the Report (frx) file the lines are set/checked "Remove Line if blank". Therefore, the Footer part of the frx should not even print.
And yet, some customers, have a blank page printed after each report.
I suspect that the Footer is causing the blank page.
What do you see can be changed in my approach?
TIA

UPDATE. I just noticed that when I go to the Report -> Optional Bands, I see a box "Report has summary band" is checked. Even though the report itself does not have (in the design view) the Summary Band.
Could this be the problem? Should I uncheck this box?

UPDATE2. Never mind my writing the Footer. Actually the above expressions (IIF()) are in the Summary Band.
So, the Summary Band is necessary.
The title of the thread should be Remove Summary if nothing to Print.

UPDATE3. I also noticed the following:
Each line (in the Summary band) has the value of the Bottom and the value of the Top of the next line are different by 1. For example:
The 1st line Bottom is 20
The 2nd line Top is 21.
Could this - 1 - be causing that the Summary Band is printing, even if nothing is to print?

UPDATE4. The change I describe in UPDATE3 made the difference. The blank page is no longer ejected.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Reply
Map
View

Click here to load this message in the networking platform