Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Build A Report Template Where Field Titles Are moving Targets

Status
Not open for further replies.

dominicdunmow

Technical User
Jul 28, 2004
125
CA
Hi there,

I need to build a report, the problem is that the fields are date based, and so the field names change depending on the dates of the records within the queries.

Is it possible to build a report template if you don't necessarily know what the field titles are going to be.

I get round this in the query that the report is based on by using the '*' to selct all fields, but I can't find a similar way of doing this within a report.

Can anyone help please?
 
are you trying to change the amount of fields that are displayed on the report, or just changing the field labels??? depending on the query...
 

The number of fields will change for example if a contract is long term.
 
If you only have a set number of report template to use why don't you have 2 report.

what i would do is have a preview/print report button on a form, depending on the information on the form, whether or not the customer is long term, then the correct report would be shown to the end user.

That is going to be your easiest. But i do not know how many different types of customer you have.

If you need any coding of how to do this i would more then happy to help. Its all quite easy. It would require no user input, just what information is on a form/table.
 
Thanks for your input - I don't understand your train of thought though.

Perhaps if I explain a little more.

E.g. A customer has a payment plan from Q1 2005 to Q1 2006.
I can represent this on a report easily, I'd pick the fields Q1 2005, Q2 2005, Q3 2005 etc. from the query.

But then as part of the same table a customer has a payment plan from Q1 2006 to Q1 2007 - my original report won't picik up these new fields as it was designed to take Q1 2005, Q2 2005, Q3 2005 etc.

Does your thinking still apply?
 
I get you now...

My thinking would not apply here...

OK. What fields would be shown in one report, and then not shown in another.

I'm just trying to get an understanding of the end results, how you need it to look.

You are talking about payment plans! Would 1 customer only have 1 payment plan.

Because now i am thinking about a sub-report, containing this information. If you need it to be shown like

Q1 2005 "PAYMENT"
Q2 2005 "PAYMENT"
Q3 2005 "PAYMENT"
etc
etc

Then a sub-report would do, this would change for each customer.

But this would then all depending on your table layouts, and how you store the data.

I hope i am getting to your way of thinking or trying to understand how you need the report. We'll get there..
 

I wasn't aware of sub reports - this sounds like the way forward. I'll read up on them.

...I must log off now - thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top