Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Value Parameter Array Use in a Formula

Status
Not open for further replies.

egundrum

Technical User
Dec 29, 2004
13
US
Howdy - i'm on Crystal 10 off a Sybase database. I'm prompting the user for a multiple value parameter
?Checklist which can hold 1 to 5 different string values with the user selecting which ones to identify with an "X" on the report. I'm trying to create a formula that will cycle through the parameter selections and return corresponding verbage on the report per the following:

Parameter : Corresponding Verbage

FinStatments : "All financial statements."
MgmtLetter: "Management Letter."
ActionPlan : "Corrective Action Plan."
FedAwards: "Federal Awards."
Other : "Other description."

I tried setting up a Select Case structure and looping through the parameter using ubound(?Checklist) to determine the size and then create the list, but what was returned was "TRUE" instead of a listing of the Corresponding Verbage.

I need the report to show all 5 line items, but am showing a "X" next to the items selected in the parameter (i.e. user may only need ActionPlan and Other, so I want these two lines to show with an "X" before the description, but need to show all the other items without an "X".

Any help would be appreciated!!!
 
Try the following:

whileprintingrecords;
stringvar array parm := {?parm};
numbervar counter;
stringvar display;
stringvar array parmoptions := ["All Financial Statements","Management Letter","Corrective Action Plan","Federal Awards","Other Description"];
redim preserve parmoptions[ubound(parmoptions)];
redim preserve parm[ubound(parmoptions)];

for counter := 1 to ubound(parmoptions) do(
if parmoptions[counter] in parm then
display := display + parmoptions[counter] + " X" + chr(13) else
display := display + parmoptions[counter] + chr(13));
display;

-LB
 
Thanks LB. Worked like a charm!!!! I was working towards this solution, but just couldn't get to the finish line on it. One follow-up question.....do you or anyone else know of a way to get the final format to appear with the "X" fully underlined?

Here is what I've got:

display := display + "__X__" + parmoptions[counter] + chr(13)

results in
__X__ Financial Statments

I've looked for ways to format the code...i was thinking perhaps I could find an ASCII or Unicode that was closed to an underlined X, with no luck.

thanks again for your assistance.
-ed




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top