Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sorting in Array Post Reply Post New Topic
Author Message
TorLang
Groupie
Groupie


Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Quote TorLang Replybullet Topic: Sorting in Array
     Posted: 24 Apr 2015 at 3:15am
I'm using an array to pull CPT codes for patients (up to 5 CPT's) I need to be able to sort these (they are associated with a CPT rank number), but unsure how to incorporate the rank number into the array:

Declaration:

WhilePrintingRecords;
Global stringVar array cpt;
Global numberVar b;
stringvar P;
P := {TSM911_CPT4_REF.cpt4_ext_id};
if not (P  in cpt) then
(b := b + 1;
if b <= 6 then
 (redim Preserve cpt;
cpt := P))

Reset:

WhilePrintingrecords;
Global stringVar array cpt;
Global numberVar b := 0;
Redim cpt[1]; " "

Display (CPT 1):

WhilePrintingRecords;
stringVar array cpt;
Local stringVar cpt0 := "";
if UBound(cpt) >=1 then
cpt0 := cpt[1]


Edited by TorLang - 24 Apr 2015 at 3:16am
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