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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column Headings/Report Setup

Status
Not open for further replies.

fredka

Technical User
Jul 25, 2006
114
0
0
US
I have a report that takes the timeframed entered in a report and then compares that current timeframe (i.e 1/1/06 to 12/31/06) to the previous 3 years.

The query results are 5 columns like follows:

recd month 2003 2004 2005 2006
1 42 78 91 64
2 23 23 234 365
3 235 83 5 54
4 23 54 74 55
5 63 0 45 45

The years will change depending on the start and end date entered. My problem is that I have a report with 2 sub-reports. One subreport uses unbound fields and if there are less then 4 years, it hides the unused.

When I try to add this report as a sub-report to my main report I get an error that says:

You cant use a pass through query or a non fixed column crosstab query as a record source for a sub-form or subreport. Before you bind the sub-report to a crosstab query, set the querys columnheadings property.

I am using a main report because I am including the data and also a chart as sub-reports.

(by the way, I am not using a crosstab query)

I hope that makes sense - thanks!!!

Fred
 
Have to considered making your query a Make Table one? Create a temporary table and generate sub-report from the table.
 
If you aren't using a crosstab to generate your columns/fields then what are you using?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
If you set paramaeters in the crosstab in the subreport for all possible years then the report will work, but you will then need to hide those years that you are not interested in
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top