Hello,
since some hours I'm struggling with 2 multi-value cascading parameters which default values should be always "Select ALL"
First Parameter:
available vlaues: From query
dataSetsGetCountry (defined as select from tblCountries)
ValueFied:ContryName
LabelField:CountryName
DefaultValues: from Query
dataSetsGetCountry
ValueFied:ContryName
SecondParameter:
available vlaues: From query
dataSetsGetAreas (stored procedure which parameter is the list of the selected countries)
ValueFied:AreaName
LabelField:AreaName
DefaultValues: from Query
dataSetsGetAreas
ValueFied:AreaName
First time I open the report
the first and the second parameters are properly filled and for both parameters "select all" is checked.
I select one option from the first parameter, the second parameter's content change dinamically and "Select All" option is still selected !Cool
Now I change the selection on the first Parameter, by checking AN ANOTHER item from the list , the second parameter list refresh dinamically but "Select all" IS NOT selected and only the item that were previously checked kept the selection !!!NO!!
Is this a bug in Reporting services and I have to say to ther user that is not possible to develop what they would like to have or there is , even programmatically, a way to solve it?
Thankx for any helps!
Marina B
Hello,
I notice that your second parameter is populated by a stored procedure. Is it possible for you to perform that query from within SRS rather than as a stored procedure?
I'm fairly new at this, so I hesitate to make an absolute statement, but multi-value parameters don't work well with stored procedures.
Also, the second query, the one accepting the first parameter must use an IN clause, rather than a WHERE clause, to filter the results.
I bow to any contradictory experience others may have.
Respectfully,
David Emigh
|||Hi David,
I changed the definition of my parameters based on your advice
dataSet: dsGetCountry (defined as select from tblCountries)
ValueFied: ContryID
LabelField: CountryName
DefaultValues: from Query
dataSet: dsGetCountry
ValueFied: ContryName
Now the Second Parameter is setup in this ways
I created a new DataSet named: dsgetAreaByCountryID
select distinct(AreaName)
from [dbo].[tblArea] a
INNER JOIN [dbo].[tblcountry] c on a.CountryID = c.CountryID
where not AreaName is null and c.CountryID in (@.cc)
group by AreaName
order by AreaName asc
@.cc is a new Parameter which value is =Parameters!CountryID.Value
I tried to copy write directly c.CountryID in (Parameters!CountryID.Value)
but I get an error ( the ! is not welcome)
dataSet: dsgetAreaByCountryID
ValueFied: AreaName
LabelField: AreaName
DefaultValues: from Query
dataSet: dsgetAreaByCountryID
ValueFied: AreaName
Anyway I have the same problem as with the Stored Procedure!!
Did I follow exactly your advice?
Thank you very much
Marina B
Have you adjusted the settings in the report parameters?
From the data or layout view:
Report menu > Parameters
|||mmhhh ... your last reply is not completely clear to me.
what do you mean with that...
I have changed the parameter setting as I wrote in my last message...
Did I forgot something?
Thankx
Marina B.
|||I have had the same results. Don't think it's a bug. It looses track if you start going back and forth. If you want to start the parameter selection over you might be better off hitting refresh and selecting the parameters in the correct order. Be sure to explain the same to your end users. I do agree that it would be nice if it always keep track of them.|||How is possible to hit the refresh?
Programmatically?
Thankx very much
MArina B.
sql
No comments:
Post a Comment