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

crosstab total 2

Status
Not open for further replies.

ind123p

Programmer
Sep 28, 2005
62
I am using CR XI..Access 2000

I have inserted a crosstab report.

Jan Feb Mar Total
Product A $100 $200 $10 xxxx
Product B $35 $303 $230 xxxx
Product C $200 $293 $222 xxxx
Client 1
Product A $101 $200 $12 xxxx
Product B $35 $300 $211 xxxx
Product C $200 $293 $22 xxxx
Client 2
Total xxxx xxxx xxxx

I wish to accomplish the following

Jan Feb Mar Total
Product A $100 $200 $10 xxxx
Product B $35 $303 $230 xxxx
Product C $200 $293 $222 xxxx
Client 1
Product A $101 $200 $12 xxxx
Product B $35 $300 $211 xxxx
Product C $200 $293 $22 xxxx
Client 2
Total for A xxxx xxxx xxxx
Total for B xxxx xxxx xxxx
Total for C xxxx xxxx xxxx
Total xxxx xxxx xxxx

Can you give me direction to proceed?
 
One solution would be to size the section the current crosstab is in to just house the crosstab, then right click the section it's in and select insert section below, then insert another crosstab below and use product as the row, $ as the summary field.

Note that it doesn't make sense for a crosstab to change it's properties at the end, even if we could code around it, so use means to accomplish the summary part.

-k

 
K,

Very good.. Your solution worked perfect...


Thanks ..Star for you...
 
K or any other expert,

K helped me solve this cross tab issue.. Now for the same crosstab, I have to sort on summarized fields for each month. Folks have responded to my query (LB, JudyL) but I am not able to resolve it..


Jan Feb Mar Total
Product A $400 $450 $500 xxxx
Product B $350 $303 $230 xxxx
Product C $200 $293 $222 xxxx
Client 1
Product A $401 $600 $412 xxxx
Product B $350 $300 $211 xxxx
Product C $200 $293 $202 xxxx
Client 2
Total for A xxxx xxxx xxxx xxxx
Total for B xxxx xxxx xxxx xxxx
Total for C xxxx xxxx xxxx xxxx
Total xxxx xxxx xxxx xxxx

In the example, I have shown the amounts in descending order for each month...

When I use the TopN approach, I only see some of the amounts sorted in descending order.. What am I missing?

Please help
 
Your example doesn't match any other sample data you have provided so far. Here is what the problem is--you cannot individually sort each month, as it would require a different sort order of the products for each month--which is impossible in a crosstab.

Your last example (with the desired group sort) works because you provided each product with summaries that would sort in the desired way. But for example, if we sorted your first example in this thread month by month, Product C would be #1 position for January, #2 for February, and #2 for March; Product B would be #3 for Jan, #1 for Feb, and #1 for Mar, etc. This is why I mentioned in the other thread that you could only sort on the total.

-LB


 
LB,

I clearly understand what you are saying...I think I did not understand my client's requirement clearly...He probably was refering to sorting the total.

You are correct.. sorting on individual month will be impossible..

As always thanks for your assistance. i will give you a star for your time...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top