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!

Should I make a manual crosstab?? 1

Status
Not open for further replies.

oticonaus

Technical User
Dec 16, 2003
96
0
0
AU
I need to create a crosstab which is organised into Weeks (1-52). Needless to say that is a lot of formulas for a manual crosstab and I wonder if there isn't a smarter way. The reason for not using a standard crosstab is that there may not be data for every week, but each week needs a column. So the report would look something like this

Shop1 Wk1 Wk2 Wk3 Wk4 .... Wk52

Group 1 3 5 2 3
Group 2 4 2 3 5
Group 2 3 3 2 3
Total 10 10 7 11

Shop2 Wk1 Wk2 Wk3 Wk4 .... Wk52

Group 1 6 5 2 3
Group 2 4 3 5
Group 2 3 3 2 3
Total 13 8 7 11


So, for Week 3, there is no data available - but I still need to display the week 3 column. I will not know in advance the week that may have no data.
 
Create a table with one record for each calendar date (and a date column). Use Outer Join from that table to your transaction data. You would then have records for each week...

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
If you can't change the database or get a table added by whoever manages it, then you are indeed stuck with the tedious process of making a Manual Crosstab / Mock-Crosstab.

You can save a little time by doing a paste to a dummy report, changing the name and then pasting back.




[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top