Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to suppress printing total until Last Page
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00879836
Message ID:
00882228
Views:
12
>I am trying to print totals on the last page of a 'Particular' invoice.
>Say on a file I am printing, there could be 10 invoices to print.
>Now say 3 of these may go over 1 page , and I dont want to print the total of the invoice on ALL pages of the invoice, just the last page of that particular invoice.
>
>I print a lot of detail on the 'Last page of the Invoice' .
>My problem arises if , sat there are two pages on an Invoice, and on the last page, no detial lines print, but the totals do.
>However, it is taking this detail from the new band
>
>e.g. Lines are as follows:
>
>Inv No. Line No
>3001 1
>3001 2
>3001 3
>3002 4
>3002 5
>3002 6
>
>Now if Invoice no 3001 happens to take say 2 pages, and on the second page no Line details print, the totals and other details should be taken from line 3.
>However, they are beeing taken from Line 4
>These totals are set to print at End of Page
>On end of Group, I have a FlipVar which sets a flag saying that we are now at the end of a group.This Flag is tested in the Totals controls and the totals only print if the EndOfGroup flag is set to true
>
>(This is the reason the Totals are printed at the end of a page. There did not seem to be any other way of telling Foxpro that it was at the End of a group and print the dtotals at the end of a page, but only where it was at the end of a group)
>
>(This problem does not happen if for instance ONLY one INvoice is selected or if there is at least one line prined at the Detail Band level.
>
>
>I realise there may be another way of doing this , but this has been working for years in 2.6 and I just copied up ti forms to VFP8.
>

We ran into the same problem a while go. What worked for us in VFP7 (have not converted to VFP8 yet) was to make sure that at least one detail line printed on the last page of an invoice (i.e. Group Footer).

We accomplished this by adding a dummy field to the detail line. This field was expanded to take up several lines (the same size as the group footer plus some), had an expression equal to "", and the remove line if blank checked.

The net result...the dummy field never really printed anything, but it seemed to trick VFP into thinking that the last detail line needed to go to a new page if there was not enough room for the group footer.

If my explanation is not clear enough, I could email you a sample frx.
Previous
Reply
Map
View

Click here to load this message in the networking platform