Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Overflow data to next page.
Message
From
08/08/1997 11:57:50
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00043581
Message ID:
00043726
Views:
42
>I have a report that will fit 10 columns across. Unfortunately, some users may require many more. Is there a way to get columns 1-10 to show on page one, and columns 11-20 on page 2? This report is also a multi-page report, so page 1 and 2 would be the first page of the entire report, 3 and 4 would be the second and so on. Any ideas? Thanks for any feedback.
>Marcus.


I did that already based on the same idea of creating a multiple detail band report that was discuss on a thread.

Create a cursor that contains all the fields you need plus an extra field that will contain a page number.
When you populate your cursor (through a loop) you keep a counter that increments the page number every time you have reached the maximum number of columns of your report. Then in the report you use data grouping on pageno and select "start each group on a new page".
Your report is designed on a single page with a fixed number of columns, lets say 10, but you trick him by fiting unlimited number of columns into 10 columns.
If the number of records exceeds one page, for example 2 pages, a record would be printed on page 1, and page 3 instead of page 1 and 2 like you first asked but does a big part of the job.


example that prints 12 columns on 5 columns:
CREATE CURSOR myData (x,y,z, col1, col2, col3, col4, col5, pageno)
resulting data:

claude,y,z,c1,c2,c3,c4,c5,1
lina, y,z,c1,c2,c3,c4,c5,1
peter, y,z,c1,c2,c3,c4,c5,1
george,y,z,c1,c2,c3,c4,c5,1
mark, y,z,c1,c2,c3,c4,c5,1
claude,y,z,c6,c7,c8,c9,c10,2
lina, y,z,c6,c7,c8,c9,c10,2
peter, y,z,c6,c7,c8,c9,c10,2
george,y,z,c6,c7,c8,c9,c10,2
mark, y,z,c6,c7,c8,c9,c10,2
claude,y,z,c11,c12, , , ,3
lina, y,z,c11,c12, , , ,3
peter, y,z,c11,c12, , , ,3
george,y,z,c11,c12, , , ,3
mark, y,z,c11,c12, , , ,3


This what I formerly called "La passe du coyote"
Is that worth 5 cents?

Claude.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform