I am trying to pass through a parameter from VB6 to a Crystal Report, but the parameter has multiple values. (eg. The user wants to see a report on selected facilities) What is the syntax for doing this?
I concatenated all the selected values into a string delimited by commas. In the crystal Report, there is a selection formula set up to look for the users.
The code I'm using to pass through the parameter to the report is:
.ParameterFields(0) = "Username;" & users & ";true"
where Username is a parameter set up in Crystal, and users is the concatenated field (asmith, bjones, etc)...
Could you help me with the syntax that I should be using, as this doesn't work?
Sorry, I don't quite understand what you're asking for. In Crystal, the Parameter Username is set up, this is checked off to allow multiple values. In the
Selection Formula, this appears:
{@TheDate} in {?From Date} to {?To Date} and
{EDL_PERSON.PERSON_STATUS_ID} = "A" and
{WORK_DONE.CLASSUSER} in {?Username}
I was wrong in my last post....no records display at all when passing through the names as user1, user2, etc or user1 OR user2 OR user 3, etc.
If I change the condition to the InStr(str1, str2), it won't allow the syntax and comes up with an error saying "a string should be here" and places the cursor in front of the {?Username} parameter.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.