Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Combinine multiple records in one Details section Post Reply Post New Topic
Author Message
GrisCorp
Groupie
Groupie
Avatar

Joined: 08 Mar 2013
Online Status: Offline
Posts: 64
Quote GrisCorp Replybullet Topic: Combinine multiple records in one Details section
    Posted: 14 Oct 2014 at 7:56am
I am using Crystal Report XI R2.

I have some customers that give specific instructions for some of the parts they order from us.   We enter those instructions into our ERP which then splits each line of the instructions into its own, separate, up-to-50-character, record in the db by Part ID and Customer ID.

I have a subreport that pulls those instructions, but the formatting is terrible.  I have written formulas to combine all those records into one field, but it repeats the last record or if only one record, it repeats that.

Here are my formulas:
Instruction 1:
WhilePrintingRecords;
Global Stringvar Notes;
Notes:= Notes & {Standard_Notes.NOTE_46}

Instruction 2:
WhilePrintingRecords;
Global Stringvar Notes:=""
Here is how I have inserted the formulas into the subreport:
GH1      {@Instruction2}
Details  {@Instruction1}
GF1       {@Instruction1}

I have suppressed GH1 and Details.  I end up with Notes like this:

Several lines/records:
Target is 6-8psi. Do not exceed 9psi.  Flag seams.  Mark the color of the sponge on the labels, including black.  on the labels, including black.

Only one record:
Use Whiting pallets. Stand rolls on end.  Use Whiting pallets. Stand rolls on end.
How can I prevent the last (or only) record from duplicating?


Edited by GrisCorp - 15 Oct 2014 at 3:38am
IP IP Logged
z9962
Senior Member
Senior Member
Avatar

Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
Quote z9962 Replybullet Posted: 14 Oct 2014 at 11:41pm
in your GF1 delete the Instruction1, create a new formula just to display the record.
WhilePrintingRecords;
Global Stringvar Notes;
IP IP Logged
GrisCorp
Groupie
Groupie
Avatar

Joined: 08 Mar 2013
Online Status: Offline
Posts: 64
Quote GrisCorp Replybullet Posted: 15 Oct 2014 at 2:09am
That did it!

Thank you, z9962!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.