General information
Category:
Reports & Report designer
>I'm not sure either, but what steered me in the right direction was the use of the FIELD() API, in conjunction with tests for columncount FCOUNT(). Granted this is not perfect, as I can only put upwards of 10 columns in the report, but the user in theory could setup hundreds of columns (very unlikely).
The page mechanism is exactly the way you deal with an unknown number of columns. But perhaps the term "page" is confusing.
The idea is that, as with a spreadsheet, you have multiple pages across as well as down. So the calculation I showed is to figure out how many pages _wide_ the report is and the complex expression for each field lets you run the report multiple times, but get different results depending on the value of the nPage variable.
Say your user picks 87 columns and you've design the report with 10 columns. If you use the mechanism from Nancy's article, the nPages variable will be 9 and the REPORT FORM will run 9 times. The first time, it'll report on fields 1-10; the second time, fields 11-20, and so forth, until the last time through the loop, it does fields 81-87.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only