Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Feeds in report designer
Message
 
 
À
19/06/2002 19:15:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00669987
Message ID:
00670402
Vues:
37
>We're actually trying to duplicate a report that was created in R&R Report Writer. In that report the

He-he. I had exactly the same problem. The original report was designed in R&R (DOS version). In that report chr(12) worked fine. ~2 years ago, when I was faced this challenge, I tried lots of different ideas. Cathy's idea was also one, I've tried unsuccessfully. I spent more than month before I've realized, that there is no simple way to have a completely blank page inserted. So, I invented this complicated algorithm (and unfortunately it requires two passes) to do the job.

Today I tried again Cathy's approach, and, as it was 2 years ago, I could not produce a completely blank page. May be there is still a way?


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
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform