Print Page | Close Window

Grouping assoc group data w detail

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22297
Printed Date: 04 May 2024 at 9:06pm


Topic: Grouping assoc group data w detail
Posted By: Harry5
Subject: Grouping assoc group data w detail
Date Posted: 19 Apr 2017 at 1:29pm
I need to create a flat file for export - there are multiple samples w several data fields but the first sample contains data that needs to be associated w each of the samples ie

Sample #   test   site   result        address     "GH"
              
001          5     kit     3        59 oak rd   "Detail"
001          6     kit     17        59 oak rd
001          7     kit      4        59 oak rd
002          1     sink     23        59 oak rd
002          2     sink     33        59 oak rd
002          3     sink     12        59 oak rd
002          4     sink     11        59 oak rd
003          9     tub      15        59 oak rd
003          4     tub      10        59 oak rd

the address is only associated with sample 1,
                                                                                 So the address is blank for samples 002 and 003
                                                                                  How do I carry this data down for the remaining samples?



-------------
hbl



Replies:
Posted By: DBlank
Date Posted: 20 Apr 2017 at 3:15am
if this is for the entire report just use a max(field) value. IF this changes throughout the report is it based on groups? On sort Orders? Something else?


Posted By: Harry5
Date Posted: 20 Apr 2017 at 5:23am
A Work Order has several samples and each sample 1 or more tests. There will be many Work Orders in the extract - each with a different address. The Group Header would be Work Order# and the detail section has the sample#, data and address fields.

-------------
hbl


Posted By: DBlank
Date Posted: 20 Apr 2017 at 5:38am
so if you are grouping by WO then can you just do a MAXIMUM(table.address,table.wo) and place this in the detail section? This assumes there is only one address per WO.


Posted By: Harry5
Date Posted: 20 Apr 2017 at 7:13am
Thank you DBlank Worked perfectly!

-------------
hbl



Print Page | Close Window