Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2016 : Technical Questions
Message Icon Topic: Pulling multiple values from one field Post Reply Post New Topic
Author Message
Beso90
Newbie
Newbie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 17
Quote Beso90 Replybullet Topic: Pulling multiple values from one field
    Posted: 10 Jan 2017 at 6:31am
Hello,
I'm making an inventory location report and was wondering if there's a way to pull the locations for one part in one line or as many as the list can grow..

The location is one field {TRANSLOG.LOC_DESC}
but a part can exist in multiple locations, so i want those multiple locations to be listed under the part in one line hopefully..

Please and thank you!

Regards,
Basel
IP IP Logged
Beso90
Newbie
Newbie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 17
Quote Beso90 Replybullet Posted: 16 Jan 2017 at 6:26am
Please?
IP IP Logged
kevlray
Senior Member
Senior Member
Avatar

Joined: 29 Oct 2009
Location: United States
Online Status: Offline
Posts: 1260
Quote kevlray Replybullet Posted: 17 Jan 2017 at 4:34am
If I understand you correctly.  If you group by  {TRANSLOG.LOC_DESC} and in the details (with a formula).  Build a string using a global variable (I like shared variable better).  Something like this.

global stringvar locations;

if locations = '' then
locations := locations + ', ' + {location field}
else
locations := {location field}

Then in the group footer just put the global variable (in a formula)

whileprintingrecords:
global stringvar locations;

Also need a formula to reset the global variable in the group header.

global stringvar locations := '';

You probably can achieve a similar result with an array (the formulas change a little).
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.094 seconds.