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!

Counts by Date vary month to month

Status
Not open for further replies.

JimWho

Vendor
Apr 2, 2002
16
0
0
CA
I have 4 crosstab queries that count different types of registrations. The results are:
Name Total 04/01 04/02 04/04 etc.

I would like to put all 4 query results into 1 report. I guess there would be 1 master report and 3 subreports which I haven't tackled and not quite sure how to go about it.

The bigger question: The dates come over as part of the SQL retrieval. For example this month I am getting April data. Next month I will get May data.

Is there a way to setup the column labels to change to the month/day that the data displays.
 
You could use a group header set against the date and set the format of the date to month. That way as the month changed a new section would be calculated

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Thanks for your response. I think I wasn't thorough enough with my question. The Name, Total, 04/01, 04/02, 04/04 are the column labels that come from the crosstab query. The Name and Total would not change from month to month but the 04/01, etc would change each month i.e 04/01 would change to 05/01 or that particular field may be 05/05 the next time.

It would look something like this month
Code:
Name    Total   04/01    04/02   04/04

Code:
Jimwho  100       75      15       10
Code:
Frank    50        5      20       30

Next month it might look like this
Code:
Name    Total   05/05    05/07   05/08

Code:
Jimwho   99       74      15       10
Code:
Frank   100       25      45       30

So it is the labels that I need to change each month they change automatically in the crosstab. I am not conversant on grouping.

Thanks for any help you kind folk provide.
 
it depends a bit on the details oif what / how you want the results displayed. If there are just to be a row of hte dates:

Name[tab]Total[tab]04/01[tab]04/02[tab]04/04[tab]05/05[tab]05/07[tab]05/08

Jimwho[tab]199[tab]75[tab]15[tab]10[tab]74[tab]15[tab]10

Frank[tab]50[tab]5[tab]20[tab]30[tab]25[tab]45[tab]30

A set of union queries could -perhaps- be of use.





MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top