Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Display Array as comma delimited Post Reply Post New Topic
Author Message
Camro
Newbie
Newbie
Avatar

Joined: 11 Jan 2011
Location: United States
Online Status: Offline
Posts: 1
Quote Camro Replybullet Topic: Display Array as comma delimited
     Posted: 11 Jan 2011 at 7:02am
I am trying to set up an array that will display a list of item numbers (LPNS) in a group footer. I have this formula in the report header:
 
WhilePrintingRecords;
Shared NumberVar ArraySize;
Shared StringVar Array LPNS;
ArraySize := ArraySize + 1;
ReDim Preserve LPNS[ArraySize];
LPNS[ArraySize] := {LPN_HISTORY.DC_LICENSE_PLATE_ID};
''
 
Then I have this formula in the group footer:
WhilePrintingRecords;
Shared StringVar Array LPNS;
Local NumberVar i;
Local StringVar MyOutput;
For i := 1 to UBound(LPNS) do
   MyOutput :=  MyOutput & LPNS & chr(13);
MyOutput
 
The field is set to grow, but is only displaying the very first LPN when there should be 36.
 
I want to display them in the footer like this and just have them wrap at the full width of the report:
10671314, 10671315, 10671316, 10671317, 10671318, 10671319, 10671320, 10671321, 10671322, 10671323, 10671324, 10671325, 10671326, 10671327, 10671328, 10671329, 10671330, 10671331, 10671332, 10671333, 10671334, 10671335, 10671336, 10671337, 10671338, 10671339, 10671340, 10671341, 10671342, 10671343, 10671344, 10671345, 10671346, 10671347, 10671348, 10671349
 
I copied a formula I found somewhere else that hopefully just needs tweaked. How can I do this?
IP IP Logged
smithers
Newbie
Newbie
Avatar

Joined: 29 Jun 2010
Location: United Kingdom
Online Status: Offline
Posts: 1
Quote smithers Replybullet Posted: 25 Feb 2011 at 1:59am
Hiya
 
I had the same issue. i sorted it by putting the part you have put in the report header into the report details. This then displays all records for that field.
IP IP Logged
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