Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Multiple Column Groups in Cross Tab Report Post Reply Post New Topic
Author Message
brando1118
Newbie
Newbie
Avatar

Joined: 23 Mar 2009
Online Status: Offline
Posts: 1
Quote brando1118 Replybullet Topic: Multiple Column Groups in Cross Tab Report
     Posted: 23 Mar 2009 at 8:16pm
Hello,
I am new to CR and I am working in the CR XI environment.  I am connected to a SQL Server database and using one table called "WORKORDER".  What I can do:  I have a cross tab report.  For the rows I have a {description} field, for the columns I have {actualstartdate} and for the summary fields I have the count of {workorderid}'s that were started on the {actualstartdate}.  I am grouping the {actualstartdate} columns by "yeartodate" so I have three columns-(1/2009, 2/2009, 3,2009) and a series of {description}'s run down the left side for the rows.  The data are the {workorderid}'s summed up per month and per description. Simple right?  Very with CR.  Example below:

ASD = {actualstartdate}

                         ASD         ASD         ASD
                     1/2009    2/2009    3/2009  Total

description1       4             7              9         20
description2       6             7              2         15
description3       6             3              3          12

Now what I want to do and can't figure out is to have two separate dates running along the columns, {actualstartdate} and {actualfinishdate} and have totals for each of them per month. 
Now here is what I want my report to look like and I can't figure out how to tell CR that I don't want a parent/child group relationship:

ASD = {actualstartdate}
AFD = {actualfinishdate}

                         ASD        AFD        ASD       AFD          ASD        AFD
                     1/2009    1/2009   2/2009  2/2009    3/2009   3/2009 

description1       4             3              9         5              5             2
description2       6             5              5         5              6             4
description3       6             3              3         2              6             3

Total                  16           11            17       12            17            9

Can anyone please  tell me what I am missing?  I can't believe I am the only one that needs a report like this.
Any help is greatfully appreciated.
Thank you,
-B
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Mar 2009 at 7:28am

You may have a secondary issues here so I am not sure this is an easy solution.

Generally to get what you want you need to have a grouping at a higher level then sub group it under that so the fields stay together.
Example for column would be Group1 at Company and Group2 at StoreLocations.
I don't know how to do this with your data because I think you are going to have a grouping issue Since these are not the same field. Even if  you used a formula you will have an issue.
Since the cross tab needs to group data heirachically once you group the data that row will only fall into one grouping only. I assume you have bothe ASD and AFD fields in the same row for the item. If this is the case you will run into a problem when the ASD is in one month but the AFD is in another. It can only appear in one grouping and only be counted once there. If my assumptions about your data are correct I do not know what Upper level grouping you could use to make sure each item appears and is counted in each correct subsequent group. Does this make sense?
Sorry this is not an answer that solves the problem but I hope it explains the proces so maybe you can come up with a resolution...
My best guess as a possible solution is to use a stored proc or view in SQL (if you are using it) and use the table twice so you have 2 records per row and scrub it/manipulate it before it gets to crystal so you can get it grouped together correctly for what you want.
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum