Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report- Writer 2.6 - Multi Page Form 2

Status
Not open for further replies.

RandyDeWitt

IS-IT--Management
Dec 16, 2002
14
US
I previously posted this question on the Visual Foxpro Forumn, it was answered by jrbbldr (thank-you) but unfortunately has been deleted by the system. I am sorry for the duplication but do need an answer.

I have an application that requires a 3 page form for every record in my source cursor. I ordered the cursor by Social Security #, then created a report with a grouping on SSN.

I set the report to be 8.5 X 11 in landscape mode. I placed a report group making the header, detail and footer heights 8.5 inches.

I placed page 1 in the header, page 2 in the detail and page 3 in the footer.

My problems are twofold, first the page numbers do not work, then secondly, when I have more than one record in the cursor, the system will only print one set of forms.

Any insight would be appreciated. Thanks in advance.
 
Here is essentially what I said previously.

"application that requires a 3 page form for every record"[/B]

I do not approach this type of report requirement by "placing page 1 in the header, page 2 in the detail and page 3 in the footer."

Instead the approach that I use is to first create 3 separate Report Form's each of which represent one of the pages needed for each record. Within each of the objects on these Report Forms I make the Print When... expression something like PageNo = n (n being the appropriate page #).

To facilitate this effort I usually do this by "hacking" the Report Form's FRX table and using the REPLACE ALL statement for the SupExpr field for each object.

Now that I have 3 separate Report Forms I create my single final form by using Copy & Paste to copy ALL of the individual page objects into the one single Report Form. I over-lay the objects from ALL of the pages.

Now the single Report Form is ready to use.

The next step is to pre-process the data into a Cursor or Table with some additional fields added for Sorting (e.g. SortFld) and for Page differentiation (s.g. PageNo) and maybe another field, if necessary, for Page Counting (e.g. PageCntr)

For 3 pages per original record I would then enter into this temporary Report Table each original record 3 times and differentiate each copy of the record with a different PageNo field value (1, 2, 3).

Now when this new temp Report Table is sent to the Report Form, the objects for each separate "page" will print when it encounters a record with the appropriately set PageNo field value.

The only remaining problem is counting over-all pages and getting this value written onto your report. However since you know ahead of time that each record will have 3 separate pages, you can possibly use the RECNO() or the additional new field (e.g. PageCntr) to provide the Report with a page counter to use instead of _PAGENO

I hope that is reasonably clear and that it will meet your needs.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
jrbbldr,

Thank you so much for the pointer. I did as you suggested, it certainly muddies the water when examing the consolidated report BUT it works perfectly.

I never would have taken this tact. I appreciate your assistance.
 
Thanks for the star.
I'm glad that the approach I use helped you out.

In order to keep things somewhat modifiable (and examine-able -- is that a word?), I'd recommend keeping all 3 of your original individual page Report Forms.

In that way, should you need to modify something, you can do so on the appropriate page's Report Form, and then re-build the single consolidated Report Form again by, once again, combining the individual page's forms.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top