Creating report from a query in which number of fields vary from time to time

Nancy

Registered User.
Local time
Today, 15:20
Joined
Jul 28, 2000
Messages
21
I'm working on creating a report that is based on a query that can contain at any given time a different number of fields depending on what the user selects from the UI.

The user can select anywhere from 1 to 6 different fields to be breakpoints on the report. If he selects only 1 field, then the query contains only that field plus the static ones. If he selects 2 fields, then the query contains those 2 fields plus the static ones, etc.

The querydef for the query is rebuilt every time the user accesses the UI.

If I build the report based on the most recently created query, then the next time the query is rebuilt, the report will not match it.

Anyone encountered this problem before?
 
I'm confused...are you trying to save a copy of the query so that you can match it to the report, perhaps as documentation of how it was created?

Otherwise, it seems that you are getting what you want. You're building a new query, and getting a new report, each time.
 
If I were to build the report at a time when the query contained the columns Company and Customer, and then later ran the UI that changes the querydef and selected Company and Contract Number, when the report is then run, it would have not have a place for Contract Number to be displayed.

The report will have to be dynamic regarding the columns that appear.
 

Users who are viewing this thread

Back
Top Bottom