Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Newbie Q - Bringing multiple lines to a single one Post Reply Post New Topic
Author Message
rboursaw
Newbie
Newbie
Avatar

Joined: 30 Mar 2008
Location: United States
Online Status: Offline
Posts: 4
Quote rboursaw Replybullet Topic: Newbie Q - Bringing multiple lines to a single one
     Posted: 30 Mar 2008 at 11:19pm
Hello everyone, I am new to the forum as I am to Crystal Reports, so I'm sure this is probably an easy one.  I am building a basic standard report which pulls information from a call routing database.  The issue I'm having is this...
 
My goal:
Create a standard report which shows unique calls and their associated queue time, talk time, application number, ..., ... , etc.
 
My current hurdle:
The information all resides in a single table, so that makes things pretty easy.  The problem is that calls are associated with a task ID and a task type.  In this table, a task ID can show up as many as 8 times as that's how many different types there are.  Types are basically the particular message that came through the system for that task ID.  i.e. task ID 1234 will have an 'arrived' message and a 'disconnect' message, etc. 
 
What I'm missing here is that some of the information I want to show in my report shows under task type 'A' while other information I want to display shows only in records which are of task type 'B', all for the same task ID mind you.  So, if I'm making any sense here, in my report output where I'm trying to capture multiple items per row, some columns are showing blank.
 
I'm not sure if I'm asking this correctly, so I do apologize...
 
Thanks all!
Bob
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Mar 2008 at 11:32pm
If they show up exclusively as either Type A or Type B, (one of them has data and the other is empty), the I would concatenate the two fields together so that they can just appear in a single column. If that sounds good to you, create a new formula and enter something like this:
{table.TypeAfield}+{table.TypeBfield}

I have lots of tips and tricks you can use for formatting reports in my books. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
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
rboursaw
Newbie
Newbie
Avatar

Joined: 30 Mar 2008
Location: United States
Online Status: Offline
Posts: 4
Quote rboursaw Replybullet Posted: 31 Mar 2008 at 7:59am
I went back and read my post and realize I did not explain this well.
 
Here is a sample of the table I'm using.
 
TASK_ID
SUBTYPE
APPL_ID
Q_TIME
R_TIME
1234
CC
<NULL>
<NULL>
2
1234
CQ
<NULL>
103
<NULL>
1234
CN
<NULL>
<NULL>
<NULL>
1234
CD
15
<NULL>
<NULL>
 
Notice that theh R_TIME value only shows up for task ID 1234 when the subtype is CC and that the APPL_ID of 15 only shows when the subtype is CD and Q_TIME only shows when the subtype is CQ, etc.
 
Given that the task ID is the same for all of these entries and all entries relate to the same task, I want to bring everythign together as an individual record in my report so the output looks similar to the following.
 
TASK_ID
APPL_ID
Q_TIME
R_TIME
1234
15
103
2
 
I don't believe what I'm trying to accomplish is done via the concatinate function but I could be wrong as I'm very new to this stuff.
 
Does this make more sense???
 
Thanks all!
Bob
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 31 Mar 2008 at 6:55pm
Yes, this is a much better description of the question. To make this work I would group on the Task_ID field and the way the data looks, I think you could do a Max() on the other fields within that group. If the Null values cause a problem with returning bad data, go into Report > Options and choose to use the default value for Nulls.
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
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