Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Feeds in report designer
Message
From
19/06/2002 19:15:16
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00669987
Message ID:
00670363
Views:
35
We're actually trying to duplicate a report that was created in R&R Report Writer. In that report the Header/Footer printed on the blank page and is what the client(s) are used to so in this case it doesn't matter.

I have followed the code presented in the article and plan to compare both approaches to see what the benefits of each solution is (I'm assuming there will be some differences).

Aloha,

James
>James,
>
>Does it mean, that you don't have report footer and header? Or you don't care about them printing on the BLANK page?
>
>>Great, that worked perfectly. Luckily I am printing duplex.
>>I'll be sure to check out your new book.
>>
>>Aloha,
>>
>>James
>>>>Hi All,
>>>>
>>>>I have a report that requires me to issue an extra (in addition to "Start each group on a new page") form feed if it is an odd page number [Mod(_PageNo,2)#0]. I've tried putting a field Chr(12) in the group footer but is just prints out a square. Any suggestions?
>>>>
>>>>Aloha,
>>>>
>>>>James
>>>
>>>James,
>>>
>>>Here's a method I describe in my new book:
>>>
>>>- Make sure the "Start group on new page" box is checked.
>>>- Add a field object to the Group Footer band with the following expression: IIF(MOD(_PAGENO, 2) = 0, '', REPLICATE(CHR(13), 40))
>>>- Check the "Stretch with overflow" checkbox and the "Remove line if blank" checkbox on this object
>>>
>>>The number "40" is just a number I used for an example and you may have to adjust yours. It represents how many lines lines would fit on the page. This way .. if only 1 detail band prints .. the 40 CHR(13)s would cause the Group Footer to not fit .. therefore, it does a page feed and prints the "blank lines" on the next page.
>>>
>>>One catch with this trick is that the last group will also print a blank page. If you aren't printing doublesided, this is probably not what you want. To avoid the extra blank page, you can use the following code to print the report:
>>>
>>>
>>>PRIVATE pnLastRec
>>>USE MyData
>>>GOTO BOTTOM
>>>pnLastRec = RECNO()
>>>
>>>GOTO TOP
>>>REPORT FORM MyReport TO PRINTER PROMPT PREVIEW
>>>
>>>
>>>Now, change the expression for the new object to the following: IIF(MOD(_PAGENO, 2) = 0 OR RECNO() = pnLastRec, '', REPLICATE(13), 40))
>>>
>>>
>>>I hope this helps!
>>>Cathy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform