Print Page | Close Window

CRW Group By option

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6869
Printed Date: 04 May 2024 at 11:17pm


Topic: CRW Group By option
Posted By: josh2009
Subject: CRW Group By option
Date Posted: 26 Jun 2009 at 8:15am
Using Crystal Reports 8, how can I format the report so that I can group by Patient ID, LastName, FirstName. I have the ff columns to report on - patient id, lastname, firstname, equipment used and am able to generate the report but on several patients more than one piece of equipment is used -
 
0000XXXXX Patient 1 Wire .035 Fixed J 145cm
0000XXXXX Patient 1 Multi-pack JL4, JR4,Angl Pig 6Fr
0000XXXXX Patient 1 Left Heart Kit
 
How can I suppress the printing of the patient id, lastname, firstname for succeeding rows for the same patient? I've tried grouping in CRW but all it did was sort the records. Ideally, the report would look like -
 
0000XXXXX Patient 1   Wire .035 Fixed J 145cm
                                     Multi-pack JL4, JR4,Angl Pig 6Fr
                                     Left Heart Kit
0000YYYYYY Patient 25 Wire .035 Fixed J 145cm
12
 
Anu help would be greatly appreciated



Replies:
Posted By: DBlank
Date Posted: 26 Jun 2009 at 8:54am

Not sure about v8 but in vX and XI you can suppress a repeated field by right clicking on the field

selecting Format Field
select COmmon Tab
mark Suppress if Duplicated as TRUE.
 
You can also conditionally suppress a field with a formula. In that same format editor there is a SUppress option. click on the formula field and you can use the previous function in the formula...
previous({table.patientID})={table.patientID}
 
You can also group on patient ID
place the fields you do not want duplicated on the Group header and only place items that change (equipment) on the detail section


Posted By: josh2009
Date Posted: 26 Jun 2009 at 9:46am
Hi,
 
The third solution you suggested worked for me great. I tried the first one but it wasnt suppressing the repeated fields. obviously, I was missing something there. I havent tried the 2nd solution but the third one worked perfect.
 
Thanks again for your help. Very much appreciated.
 
 


Posted By: josh2009
Date Posted: 26 Jun 2009 at 12:01pm
The third solution worked great for me. I do have a follow up question for you. Once I have formatted my report, how can I go back and just change the title on my report without having to go through all the steps all over again. I initially used Report Expert and picked a style. Now that Ive completed the formatting and it's ready to go, I need to duplicate the same report with only a couple of changes, report title and a minor change in the sql statement. I can change the sql part but when I try to change the title ONLY by clicking Report Expert in the Report menu, my whole formatting is totally out of whack. Thanks again in advance


Posted By: DBlank
Date Posted: 26 Jun 2009 at 12:32pm

If I understand you correctly and you are taking about the special field called "Report Title" you can chnage that via FILE>SUMMARY INFO> Summary Tab and the "Title:" field.

I believe that whatever is in that field is what is presented when using the special field "Report Title".
Is that what you are trying to change or something else?


Posted By: josh2009
Date Posted: 26 Jun 2009 at 1:42pm
Thanks. That's exactly what I was trying to do and I was making it more difficult than it ought to be. Like I said, I'm using the first report as some sort of a template for the other reports with some minor tweaks to the SQL statement and the report title. Thanks again. I really appreciate it.



Print Page | Close Window