Print Page | Close Window

Combine fields

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11946
Printed Date: 19 May 2024 at 1:04am


Topic: Combine fields
Posted By: aloha2000
Subject: Combine fields
Date Posted: 27 Dec 2010 at 2:39pm
Hi everyone,  I have this table below that a task number might have
a description and  a memo tesk, but it's located into 2 different rows.  Is there a formula that I can use to combine the 2 fields into one?  Thank you in advance for your help.
TaskNumber  SequenceNumber Description ExtendedDescription MemoTesk
0025466 000 Exterior glass washed inside o Y
0025466 001 f entire building excluding atrium
0025467 000 Exterior glass washed outside Y
0025467 001 of entire building
0025468 000 Atrium windows washed inside



Replies:
Posted By: hilfy
Date Posted: 28 Dec 2010 at 10:00am
Is Sequence Number 000 always the description and 001 always the memo?  If it is, this is fairly simple using aliases.  I'm going to use a table name of "Tasks" in this example.
 
1. In the Database Expert, add a second copy of Task to the report - Crystal will ask you if you want to "alias" the table - click on Yes.  A second copy of Task now appears in the table list with the name "Tasks_1".
 
2.  Join from Tasks to Tasks_1 on the TaskNumber.  If not all tasks have a memo, make this a Left Outer join.
 
3.  In the Select Expert, set a filter so that {Tasks.SequenceNumber} = '000' and {Tasks_1.SequenceNumber} = '001'
 
You can now get the base data on the task from Tasks and the memo from Tasks_1.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window