110 likes | 343 Views
We can use Optionset items as dropdown Items and also make it multi selected with some default items as selected.
E N D
How to Use Multi Selected Dropdown as Parameter in CRM SSRS Report Aegis - Offshore Software & Mobile Apps Development Company
In this document, I will explain how to set dropdown list on report as Input parameter same as OptionSet in CRM. We can use Optionset items as dropdown Items and also make it multi selected with some default items as selected. We can also do it by using CRM query instead of specific values but in that case we cannot pre select default values in Input parameter. • First, create report project and add new report(.rdl) file. • Configure Multi Select Input Parameter • Open report data pane and right click on Parameters option and select Add Parameter. • In “General” tab, give appropriate “Name” and “Prompt” text as you like. • Set “Text” as Data Type. • Select “Allow multiple values” checkbox, this option sets checkbox before all options in dropdown. • In “Available Values” tab, select “Specify values” radio button and add “Label” and “Value” same as in OptionSet of CRM Entity (see below image).
In “Default Values” tab, select “Specify values” radio button and select value from dropdown which you want as default select option on report. • E.g.: Suppose the value of Cash is 100000001 and you want Cash as selected then select 100000001 from dropdown. Same way, 100000002 for Cheque and then click on Ok button (see below image).
Filter report field data by Parameter Values • Add DataSet or right click on existing DataSet and select Dataset Properties, in “Filters” tab click on add button. • Select field from Expression dropdown. (In my case it is paymentmethod). • Select “In” as operator and in “Value” field add this line “=Parameters!paymentmethod.Label”. • I select paymentmethod.Label because I want to compare record field text with text of parameter. • You can set paymentmethod.Value if you want to compare record field value with value of parameter. • (See below image).
Display Parameter values on Report. • Design report as per your need after configuring Dataset and Data source in previous step to show data. • Then run report and select options from report parameter dropdown (see below image). Here I set Cheque and Cash as default selected options.
Click on View Report button to show report output. • Now, if you want to display selected values of dropdown parameter on report then follow these steps. • Right click on body area of Report. • Select Insert -> Text Box. • Now right click on textbox and select Expression and add following text as expression. • =Join(Parameters!paymentmethod.Label, Environment.NewLine) • This will display all selected options on report with new line same as below image (I selected Cheque and Cash from dropdown). http://www.aegissoftwares.com/ms-crm-development.html
usa@aegissoftwares.com http://www.aegissoftwares.com/