mercredi 11 mars 2015

SSRS - Pass Multi Value Parameter with Available Values Option Enabled Through Querystring


I have one Parameter on my report, that has multi value on.


Parameter With Multi Value Enabled


And it's values came from a Dataset.


Available Values came from a DataSet


On my application, when I request a report, this parameter goes as an Querystring value. But when I use the multi value option, the parameter is not a single value anymore, but an "array" with multiple values (Of Couse).


REPORT?codArea=&codDiretoria=17&ultimaAlteracao=on&formato=PDF&codListaPrioridade=8&codListaPrioridade=13


Important Part:


(codListaPrioridade=8&codListaPrioridade = 13)


The issue, is the "Available Values" option. The Parameter having an Array as a value, don't have any of the "Available Values" and SSRS throw a error.


SSRS Error


Important Part:


System.ServiceModel.FaultException: This report requires a default or user-defined value for the report parameter 'codListaPrioridade'. To run or subscribe to this report, you must provide a parameter value.


If i disable the "Available Values" option, i can send this "array" without any issue:


codArea=&codDiretoria=17&ultimaAlteracao=on&codListaPrioridade=9&codListaPrioridade=13&formato=PDF


Important Part:


(codListaPrioridade=9&codListaPrioridade=13)


Report Working with Array Trougth Querystring ="----> "& Join(Parameters!codListaPrioridade.Value, ",")


The trick is that I need create in this report, this parameter with "Available Values" enabled, but this parameter need to accept "Any" values (Because the Array that is coming on querystring).


The "Available Values" must be used to show which values are available only (Inside my application).


Inside SSRS, the parameter works fine, the issue only occurs when using this report in my application, sending the parameters values in a querystring.





Aucun commentaire:

Enregistrer un commentaire