parameter multi value sting

Printed From: Crystal Reports Book — Forum Name: Technical Questions

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
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