Print Page | Close Window

parameter multi value sting

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22879
Printed Date: 20 Apr 2024 at 3:28am


Topic: parameter multi value sting
Posted By: sanchezgmc06
Subject: parameter multi value sting
Date Posted: 07 Jul 2020 at 6:24am
Hi
I have a parameter that brings back a string of programs when the user selects multiple programs

Sting looks like this
Program1&Program2&program3&program4

I am currently using this as my parameter
CHARINDEX (A.program_value, REPLACE ( '{?Program}','+','&') ) >0

The problem i am having is that the program names are very similar and the parameter ends up bringing in data for all the programs that are similar to the ones selected instead of just bringing in the data for ONLY the ones selected.

help



Replies:
Posted By: lockwelle
Date Posted: 19 Aug 2020 at 7:21am
Hi,

I know that this is old...but you could split the string into an array and then check if your program is in the array...

local stringvar array progs := split({?Program},"&");
a.program in progs;

this should return a true of false and allow the report to filter correctly. I don't have CR in front of me so my syntax could be off a little.

HTH



Print Page | Close Window