Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: parameter multi value sting Post Reply Post New Topic
Author Message
sanchezgmc06
Senior Member
Senior Member
Avatar

Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Quote sanchezgmc06 Replybullet Topic: parameter multi value sting
    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
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.