Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert blank page if page group finishes on the odd page
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00444634
Message ID:
00457200
Views:
19
>>>I'm glad to telly you, that I finally found a way to achieve the desired functionality. I used my 'kludgy' idea + really helpful John Koziol article in FoxTalk. Now it works like a charm. If you're curios, I'll send this report to you (BTW, my manager yesterday requested bunch of new additions, which I already made using hacking frx).
>>>
>>>Thanks for your help and ideas, they really forced me to work harder :)
>>
>>
>>Nadya,
>>
>>I'd be interested in knowing how you achieved this.
>>
>>Thanks,
>>Cathy
>
>Ok, I'll try to explain you the idea and if you're really interested, I'll send you the report+test file too.
>
>In the Group Entry I call this function:
>
>********************************************************************
>*  Description.......: FSetTownsEnd - function used in MTDReport
>*  Calling Samples...:
>*  Parameter List....:
>********************************************************************
>if mod(_pageno,2)>0 and not EmptyPage && Last page is odd
>*if repTowntown
>*        OddPage=OddPage+1 && Increment OddPage variable
>*endif
>*        eject
>*!*        set printer to && (NT4 & VFP6) Ends print spooling and should cause printing to start.
>     replace EmptyPage with .t., TotPages with _pageno
>     if right(city,1)'Z'
>          ccode=ccode
>          city=padr(alltrim(city),20,'Z') && Would be next in sequence
>          street=replicate('z',25)
>          append blank
>          gather memvar
>     endif
>endif
>TownEnd=.t.
>return TownEnd
>
>In the table I added two additional work fields: EmptyPage (logical), TotPages I
>(actually, I may add three fields). I have group by city, city is Char 20, but actually, I don't have city that long, so I'm sure, that I always can add Z at the end of city. My order is situs: ccode+city+street+...
>I start each group on the new page. Now, I have fake groups, like BroklineZZZZZZZZZ. This group would start from the first page. I change print when condition for all report objects (by hacking frx) to be old PrintWhen and street<>replicate('z',25) (I don't have streets with all zzz in the real file).
>
>Therefore it puts a blank page, as I desired.
>Quite complicated, but works like a charm and this is that really matters!


Nadya,

Would you email me the report and test file to create this situation. I'm trying to recreate it and I'm not having any luck.

Thanks,
Cathy
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform