Print Page | Close Window

multi select parameter

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=22964
Printed Date: 23 Apr 2024 at 10:34pm


Topic: multi select parameter
Posted By: sanchezgmc06
Subject: multi select parameter
Date Posted: 16 Sep 2021 at 6:04am
Hello

I have a multi select parameter which brings back data for similar choices even if those are not selected when running the report.

When multiple choices are selected it brings back the followin string:
1030&330&331&111

Im using:
upper(CHARINDEX (service_code, REPLACE ( '{?serv_code}','+','&') )) >0


Example:
If the user selects service code 1030 my data also brings back data for 103 because they are similar. Is there a way for it to only bring back data for 1030 which was the one selected. I cant use = '1030' because the user has the option to select multiple service codes.



Replies:
Posted By: kevlray
Date Posted: 17 Sep 2021 at 4:56am
Is it only the first four characters that you are looking for, or anywhere in the string?


Posted By: lockwelle
Date Posted: 20 Sep 2021 at 1:20pm
if you bracket the string with a leading & or +, then do an instring on &1030&. That will remove those annoying false positives.

HTH



Print Page | Close Window