Report columns spanning multiple pages

G

Guest

I currently have a report with a fixed number of columns. I programmatically
fill in the values of the header and detail controls and then hide any unused
fields so that the proper number of columns are displayed on the report.

My problem now is that I need to change the report to allow an unlimited
number of columns. Is there a way to break out the display of the columns by
page? For example if there are a total of 30 columns and only 14 fit on a
single page, can you break it out as follows:
Page 1: Columns 1-14
Page 2: Columns 15-29
Page 3: Column 30

And then if there are more detail records than would fit on one page have it
repeat the sections again? For example
Page 1: Columns 1-14 for records 1-24
Page 2: Columns 15-29 for records 1-24
Page 3: Column 30 for records 1-24
Page 4: Columns 1-14 for records 25-30
Page 5: Columns 15-29 for records 25-30
Page 6: Column 30 for records 25-30
....

Any help would be greatly appreciated!
 
A

Allen Browne

If you have an unpredictable and unlimited number of columns you need to
cope with, then presumably you are creating this data programmatically for
the report. Add an extra Long Integer column to this temp table that acts as
the RecordSource for the report. Number the records incrementally, starting
at 0 for the first one.

Then create a query into this table. Include these calculated fields:
BatchNum: [RecNum] \ 14
ColumnNum: [RecNum] Mod 14

You can now use a crosstab report where BatchNum is a secondary Row Heading,
and ColumnNum is the Column Heading. This yields columns numbered zero to
14, and repeats the groups for each batch number.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top