Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Mutliple Values Listed as Columns from Same Field Post Reply Post New Topic
Author Message
Pyrotecnix
Newbie
Newbie
Avatar

Joined: 24 Jun 2010
Online Status: Offline
Posts: 16
Quote Pyrotecnix Replybullet Topic: Mutliple Values Listed as Columns from Same Field
     Posted: 24 Jun 2010 at 4:28pm
Hello all I'm kinda new at Crystal Reports XI. I have a report that I need to make currently it is based off of date in a Microsoft SQL Server 2005 Table. What I want to do with the report is take the value of one column which could have could have 1 of 7 different values in it and count those different values. But I want to list each value in its own column. So that when it counts how many of each different value for that day I can see the statistics for that day and begin to start doing some math calculations with it. I have gotten it to list the different values and do a count on those different values but I can't get them to be there own column sections. Also when it does list the different values it only shows the ones for that day currently I need it to show a 0 for that day if it isn't showing up. Any help with this would be appreciated.

Edited by Pyrotecnix - 25 Jun 2010 at 3:07am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 25 Jun 2010 at 4:07am
if you are joining straight to the tables in the database (not using a stored proc or view) and you don't have a table of just dates, you can't show the 0...CR needs to see the data, it only reports on teh data that it sees.
 
If the values are known ahead of time, then you can have counters for each value and display those in teh group footer (which makes the above statement incorrect, but I thought that it was pertaining to showing days that have no info).
 
shared variables would be the way to go, or running totals, for each variable that you are tracking.  You can't create columns from the data...but if you have a formula you can have each formula (or running total probably) act as a column.
 
a clearer example might help more
IP IP Logged
Pyrotecnix
Newbie
Newbie
Avatar

Joined: 24 Jun 2010
Online Status: Offline
Posts: 16
Quote Pyrotecnix Replybullet Posted: 25 Jun 2010 at 4:37am

This is how the form will end up if you look at the columns there are 5 different columns with different counts. Take the Transports column it has two different codes in the DB for that column. So I want to see if there was a total of 20 records for that day and 3 of them were one of the 2 codes it counts the two codes and my count for that day would be 3. Same goes for Cancelled there is two codes for this column as well and each of these columns would need to look at the same field in the database lets call it trans_type so there is a few different values in this column that I need to track for that day and separate out into different columns. Thanks again for helping out. Please let me know if you need more clarification.
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