Repeating Headers

Ahmed.H.Qasim

New member
Local time
Today, 11:46
Joined
Mar 20, 2020
Messages
19
Hi
If I have a report with two columns, how can I repeat the headers as in Excel as shown in the attached image?
 

Attachments

  • age.png
    age.png
    76.9 KB · Views: 137
difficult but doable (and potentially not very efficient) using a query. I don't propose to suggest how here since there can be a lot of 'gotcha's' in the data and your example is pretty basic. But in principle you would use the mod operator on the ID field to determine whether the related data appears in the first group of columns, or the second. Also in a database, you cannot have repeating column headings

Suggest use the column feature of reports or perhaps two subreports, modify the criteria in each subreport recordsource to display the records required. First subform where ID<=20, second one where ID>20
 
the code on the report will only work on Print Preview.
it is also columnar report.
each page will list 40 records.
if you have less than 40, it will be "padded" with dummy records.

note the "repeating" header is not really a Report header, but a Group heading
Set to Repeat.
 

Attachments

im sorry , but can you help me more...
1-what can i do if i need 72 record in each page.
2- i have 6 columns ("id, name,age,info1,info2,info3")
 
Last edited:
The issue of how you format a report has been at least partly addressed, but having an "info1, info2, info3" grouping shows that you also have non-normalized data involved. If that is strictly for a report and the original data elements are normalized in a child table then it makes some kind of sense, I suppose.

I might suggest, though it is probably a pain in the toches to do it, that you could create an Excel Application Object and create a spreadsheet as your report. You could run a query to determine how many records you have so you can decide how many rows you need before you break at the midpoint to start the next set of six columns in column H. Placing the data in the appropriate rows and columns might be no worse than a loop within a loop, because with Excel you have essentially random access to the cells by row/column identifiers.
 
i can only show 56 on each page.
 

Attachments

Users who are viewing this thread

Back
Top Bottom