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

Dynamic Report using Crosstab Query

Status
Not open for further replies.

Jsha

Technical User
Feb 22, 2006
15
US
I know this has been talked about in other threads, but none seemed to fit my situation, or maybe I just didn't know how to apply them to mine.

My database is an employee database tracking time, project worked on, and dates. (it tracks more but thats is all that is necessary for this report/query) The crosstab query has three parameters, 1) Payperiod Start Date 2) Payperiod End Date and 3) Project Number. The date field is a date/time field in short format. Below are the results of the Crosstab query:

name emptitle phase 1/2/2006 1/25/2006 1/7/2006 Total Hours
Doe, Jane CAD 01 8 8 16
Doe, Jane CAD trav 2 2
Doe, John TECH 01 8 8 16
Doe, John TECH trav 2 2 4
Toon, Car PM 01 8 8
Toon, Car PM trav 1 1

So the query is working fine, I am ready to build my report on this very same query, but the problem lies with me creating the report. I don't know how to incorporate my parameters into the report, every time i go to make the report it asks me to run the query and uses the dates it generates as columns for me to use. I need to know how to set up this report to either 1) ask for the parameters after you hit the report command or 2) setup generic fields that will pull the information from the query into it. Or to comeup with a completely different way to get these results in a report form.
 
I find it easier with crosstab queries to simply export them to excel instead of make a report.

Then you could even to to totals along the bottom very simply and expand, narrow fields as desired. Or you could simply print, because it will have all the information laid out exactly as it appears in the crosstab query itself.

In my opinion, crosstabs don't generate to reports very easily.
 
Use the information in faq703-5466 but change the increment from month to whatever you want. Figure out how many dates/columns you want and stick with it. You will only need one date parameter.

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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top