How to select multiple parameters in a CFL ?

Amin ECHCHERRADI

Hi All,
I recently made a report in which I use querries to display my parameters in chooseFromLists, when the user selects a single parameter the report works fine.
What I would like to do, is to allow multiple parameters selection in the CFL, and take the selected items in consideration in the Filter Expression criteria.
This is really an urgent matter so any help would be most apreciated.
Kind Regards
Amin.

Heiko Szendeleit

did you use these Brackets "[" "]" in your select query ?
if so, you will get a "drop-down" list

try to use these brackets "{" "}"
so you should get a "choose from" list

this may solve your problem ?!

greets
Heiko

Amin ECHCHERRADI

Thank you for your response,

The problem is not in displaying the liste ( i already did so ) my querries are between {} and the list is displayed, my problem is how to select more than one parametter from the list and use them as a filter criteria in the report ,
example :

Let's say i click on the choose from list button of the Item ID parametter : a list of Items is showed with various IDs, [1,2,3,4,5] what I want to do is te be able to select [1,2,3] and have my filter expression show me entries where

ItemID=1 OR ItemID=2 OR ItemID=3.

Thank you anyway for your help.

Philipp Knecht

Hi Amin
Yes this is possible.
Check the content of the parameter.
It's a ; separated list of all the values you have selected.
If all the Values have th same length you may try the followng (PseudoCode):
GetData("LD.Par.MyPar").Contains(MyDataBand("MyField"))


else

something like :

(GetData("LD.Par.MyPar") & ";").Contains(MyDataBand("MyField") & ";")


hth

Amin ECHCHERRADI

Thank you very much Philipe,
Your code does indeed work, except for a tiny little problem : in addition to the selected values, it does also bring blank/Empty values.
Here's alternate way to do it :
instr(";" + GetData("LD.Par.MyParam") + ";", ";" +    MyAdvancedDataBand("MyData") + ";")>0


Best Regards
Amin

Philipp Knecht

Hi amin
Thanks also for your solution :)
hth

Amin ECHCHERRADI

You're quite welcome Philipp.
Best regards
Amin :D
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post