Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameters in record selection criteria

Status
Not open for further replies.

Katy44

Technical User
Dec 12, 2003
723
GB
I have a feeling I'm missing something very obvious!
I have a parameter in my report which is selected to allow multiple values. I understand that these values get passed into the report as an array, and I've messed around with them to get the values in the array displayed on the report. How do I use this array in my record selection formula: {Table.Field} in /is one of {?MyParamField}?

Do I have to loop through the array and build up the selection string? There must be an easier way!

 
I have that at the moment, but it doesn't seem to affect my results. If that usually works though, I will go and have another look.
 
I chose "Allow multiple values" and left the discrete /range option as discrete only. I have already used a loop to put each member of the array in a string and put that on the report.
 
I've just created a very simple report to try this out, and it works as you said it should.
There's obviously another reason why this isn't working on my other report.
Thanks for your help, I would have spent a long time assuming that this was the problem!
 
No need to create a loop to get the parameters on your report, provided that they are string data type. Use the Join() function.

Join({?YourMVParm},",")

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
The yntax to use in the Record selection formula is : {YourField} = {?YourParameter} no matter if
{?YourParameter} is a single or multi-valued parameter
 
Thank you both for your help. It is working now - I was being very stupid and not realising that all the figures on my report were in subreports, and so the parameters needed to be passed through to the subreports!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top