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

Crystal Reports XI: Crosstab Report question

Status
Not open for further replies.

deniscok

Technical User
Jun 25, 2012
8
US
Hello,


Anyone have any thoughts on how I would go about creating a report such as the example below in a crosstab?
I would need the days of week, this month/this month last year columns for the entire month.


[tab][tab][tab][tab][tab][tab][tab][tab]Monday[tab] [tab][tab][tab][tab] [tab][tab][tab][tab][tab][tab]Tuesday[tab][tab] [tab][tab][tab][tab][tab][tab][tab][tab][tab]Total 2013[tab][tab]Total 2012[tab][tab]YOY Variance
[tab][tab][tab]7/1/2013[tab][tab]7/2/2012[tab][tab][tab]Variance[tab][tab][tab]7/2/2013[tab][tab]7/3/2012[tab][tab]Variance
Cat1[tab]$100.00[tab][tab][tab]$400.00[tab][tab][tab]$(300.00)[tab][tab][tab]$500.00[tab][tab]$400.00[tab][tab][tab]$100.00[tab][tab][tab]$600.00[tab][tab][tab]$800.00[tab][tab][tab]$(200.00)
Cat2[tab]$200.00[tab][tab][tab]$300.00[tab][tab][tab]$(100.00)[tab][tab][tab]$700.00[tab][tab]$300.00[tab][tab][tab]$400.00[tab][tab][tab]$900.00[tab][tab][tab]$600.00[tab][tab][tab]$300.00
Cat3[tab]$300.00[tab][tab][tab]$200.00[tab][tab][tab]$100.00[tab][tab][tab]$300.00[tab][tab][tab]$700.00[tab][tab]$(400.00)[tab][tab][tab]$600.00[tab][tab][tab]$900.00[tab][tab][tab]$(300.00)
Cat4[tab]$400.00[tab][tab][tab]$100.00[tab][tab][tab]$300.00[tab][tab][tab]$400.00[tab][tab][tab]$500.00[tab][tab] $(100.00)[tab][tab][tab]$800.00[tab][tab][tab]$600.00[tab][tab][tab]$200.00
Total[tab]$1,000.00[tab][tab]$1,000.00[tab][tab][tab]$-[tab][tab][tab][tab]$1,900.00[tab][tab]$1,900.00[tab][tab][tab]$- [tab][tab][tab][tab][tab]$2,900.00[tab][tab][tab]$2,900.00[tab][tab][tab]$-

 
It helps to give your Crystal version - 8, 8.5, 9, 10, 11, 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options.

In this case, you are asking Crystal to do more with a crosstab than it's desinged to do, unless your version is significantly more advanced than mine. Crosstable are just A against B, with totals for both A and B if you want them.

You could do it using a'Mock Crosstab'. This is something that looks like a Crosstab, but in fact you define each column yourself, normally as a running total. This would need to go in the report footer, because running totals count as the reports 'run' and they will not be complete until then. Crystal should have included an example along with the Crosstabs.

You can save a little time by doing a paste to a dummy report, changing the name and then pasting back. In Crystal 11.5 or Crystal 2008, you can also duplicate formula fields using the Field Explorer.

I suggest you start with the totals and get them right. Leave gaps for the variance, and them add those fields and the difference between two running totals. But note that running totals can be null, and nulls stop everything.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Madawc, thanks for your response. I'm using Crystal 2011, sorry I overlooked that.

I was afraid it would have to be a mock crosstab, but was hoping there was a chance it could be done in a crosstab.
I have some experience with the mock crosstab and so I understand you suggestions/comments in that regard.

Thanks!
 
Fine.

It does help to say what you've already tried, or know you could try.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top