Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Multiple Parameters, number vs. string Post Reply Post New Topic
Author Message
lls8000
Newbie
Newbie


Joined: 01 Dec 2009
Location: United States
Online Status: Offline
Posts: 7
Quote lls8000 Replybullet Topic: Multiple Parameters, number vs. string
     Posted: 11 Aug 2011 at 8:57am

I have a report with a parameter that allows multiple selections. The parameter value is a number data type. That number is used on the primary data table, but the number doesn’t mean much to anyone. On another table, a corresponding display name is stored. The display name is a string data type.

I can get the first parameter selected value to print using a formula like this:

if {?Facility} = {B.CODE } then {B.DISPLAY}

Result looks like this:  XYZ Location

 

And I can get the multiple parameter numbers to print using a formula like this:  

WhilePrintingRecords;

NumberVar Array Input := {?Facility};

NumberVar howmany:= count (Input);

ToText (Input [1],0,'') +

if howmany > 1 then ', ' + ToText (Input [2],0,'') +

if howmany > 2 then ', ' + ToText (Input [3],0,'') +

if howmany > 3 then ', ' + ToText (Input [4],0,'')

Result looks like this:  453123, 978123, 892374

 

But I’m not able to successfully get a list of the display names that correspond to the parameter values. I want to see: XYZ Location, ABC Location, LMN Location

 

Any ideas? Thanks! LLS



Edited by lls8000 - 11 Aug 2011 at 8:59am
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