Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
candyme
Starting Member
4 Posts |
Posted - 2006-10-16 : 04:41:15
|
Is it possible to pass multi-value parameter from UI to report and upon displaying the report, allow the user to select values from this multi-value parameter? Thanks! Using RS 2005Gerri |
|
Will Riley
Starting Member
10 Posts |
Posted - 2006-10-30 : 18:01:01
|
Sorry this is such a late reply...Short answer = YESEG. Lets say we have a simple dataset query such asselect * from acctgroup where id = @groupidThis becomes the base dataset for the reportI add a second simpler dataset as followsselect distinct id from acctgrouporder by id ascThe select Report>Parameters from the designer UI toolbarYou should see groupid listed as a parameter...On the right hand side of the panel, you can select the datatype & a prompt the user will see. Under available values option you can select that the parameter value can be selected from the second dataset using the value field id - you can if you like select a default value or leave as Null so the report does not execute until the value is selected.In report preview, you should now see your parameter box top left of the report with the ability to select from the dropdown which will contain the results of the dataset2 query.Hope this helps.The XML produced will be something like this<ReportParameters> <ReportParameter Name="groupid"> <DataType>String</DataType> <Prompt>Group Select</Prompt> <ValidValues> <DataSetReference> <DataSetName>DataSet2</DataSetName> <ValueField>id</ValueField> </DataSetReference> </ValidValues> </ReportParameter> </ReportParameters>Cheers,Will |
|
|
|
|
|