BobDennison
Programmer
I saw a thread that addressed an issue similiar to this one, but I am not sure how to adapt it to my situation, since it was dealing with a command, so I am posting this question as a new thread.
I am using Crystal 2008 service pack 2.
Here is my situation. I have a main report that contains 3 sub reports. Each of the subreports are using the same data source, but retrieving the data using different sets of criteria. I have 4 parameters on the main report: 'Begin Year', 'End Year', 'County' and 'City'.
Originally the users just wanted to be able to select 1 county and 1 city within that county. No problem, that worked fine. Now they have decided they want to be able to select multiple counties and multiple cities. So, I changed the county and city parameters so that they can accept multiple values. When you select, say 5 counties, the main report creates an array of values, as I would expect, but it passes this data to the sub reports as a string.
I tried to use this string using the select expert by saying 'is one of' and then the variable that is being passed to it from the main report. If you look at the SQL that is generated by Crystal it shows '=' to the variable. Now, this is never going to work because this variable is a string that contains the 5 counties that were selected separated by a comma and a space. Ugh!!
So I tried creating an array variable in the sub report and then splitting the variable passed to it into it's separate values. This didn't seem to work very well because I can't use an array in the select expert. I even tried manually editing the selection criteria and putting the array in there. That didn't work either.
What do I do now? Any help in solving this problem would be greatly appreciated.
Thanks,
Bob
Tearing my hair out! (What's left of it anyway).
I am using Crystal 2008 service pack 2.
Here is my situation. I have a main report that contains 3 sub reports. Each of the subreports are using the same data source, but retrieving the data using different sets of criteria. I have 4 parameters on the main report: 'Begin Year', 'End Year', 'County' and 'City'.
Originally the users just wanted to be able to select 1 county and 1 city within that county. No problem, that worked fine. Now they have decided they want to be able to select multiple counties and multiple cities. So, I changed the county and city parameters so that they can accept multiple values. When you select, say 5 counties, the main report creates an array of values, as I would expect, but it passes this data to the sub reports as a string.
I tried to use this string using the select expert by saying 'is one of' and then the variable that is being passed to it from the main report. If you look at the SQL that is generated by Crystal it shows '=' to the variable. Now, this is never going to work because this variable is a string that contains the 5 counties that were selected separated by a comma and a space. Ugh!!
So I tried creating an array variable in the sub report and then splitting the variable passed to it into it's separate values. This didn't seem to work very well because I can't use an array in the select expert. I even tried manually editing the selection criteria and putting the array in there. That didn't work either.
What do I do now? Any help in solving this problem would be greatly appreciated.
Thanks,
Bob
Tearing my hair out! (What's left of it anyway).