Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Cross-Tab Post Reply Post New Topic
Author Message
blues
Newbie
Newbie


Joined: 11 Apr 2007
Online Status: Offline
Posts: 2
Quote blues Replybullet Topic: Cross-Tab
    Posted: 24 Apr 2007 at 4:42am
ID   Name       Type
1    John         Group
2    John         individual
3    John         individual
4    Michael     Group

In database, datas as seen above. I wan't to show them like cross-tab for each name as a different page as below:


Page1

          individual                  Group
John  Count(individual)(2)   Count(group)(1)


Page2

               individual                  Group
Michael  Count(individual)(0)   Count(group)(1)



Note: Michael isn't recorded as individual in database, it must show zero count individual(0), namely both individual and group column are seen continuously and also values are seen.

The problem is because of not being individual record for Michael in database, it isn't seen both individual and group column. Only shows group column,  because of being group record.


Thanks...




IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 24 Apr 2007 at 11:01am
I would do a SQL Command object and have two sql statements. The first tracking the count of individuals and the second counting groups. Then link them together. Something like this:

SELECT ID, Name, Count(*)
From yourtable
WHERE Type='Individual'
Group BY ID, Name

SELECT ID, Name, Count(*)
From yourtable
WHERE Type='Group'
Group BY ID, Name


Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.