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

Cross-tab question

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
HI, We are using CR XIR2 / MS access database.
In one of the requirement user needs the cross tab same as the following example:
Row - Sales person name
Column - Month- Year
Summarize - sum (product sales)

And they need one more column which need to give the difference between current year and previous year sales.

Jan-07 Feb-07 ...Jan-08 Prev.year diff
S-man1 100 92 250 150
S-man2 50 45 43 - 7
....

So here the "Prev.year diff" column needs the calculation difference between the summarized values Jan-08 and Jan-07. Hope it may be create manually outside the cross tab. I need help on getting that value inside/outside the cross tab.

Please let me know if you need more information.

Thanks,
-M
 
I don't think you can do that in a crosstab. You could do it separately, running totals for the previous year and current year and a formula field to compare them.

This would have to be outside of the crosstab. If you want them as a right-hand column, you'd need to be sure the crostab didn't expand and over-write. Best done separately, or else do everything as a mock-crosstab.

(A 'Mock Crosstab' 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.)

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
There might be a way to do this within an inserted crosstab, but I don't follow why you would be comparing Jan to Jan, and not Feb to Feb, etc. Is the crosstab always based on a calendar year? Are you just using January as a sample comparison?

-LB
 
You don't really need a crosstab for this report. Throw the crosstab out and replace with a report grouped by sales person and a formula summarised for each month in the report. Then the additional column is really easy.

Editor and Publisher of Crystal Clear
 
Thanks for your response. I created a manual corss tab. And it works ok.

Thanks for your replay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top