1. Create a Data Set
2. Create a 2nd Data SetYou will use this for your report parameter(that you will set up in step 3). Call it “Country_List”. You want to make a list showing every country available based on the customers list. Use “GROUP BY” so that countries in the list are unique. You can use “UNION” so that you can allow the user to select “ALL” the countries without having to click every country.
3. Create a report parameterCreate a report parameter, “rp_Countries”. Set the Data Type to “String”. Select “Dynamic” radio button from “Select List Values”. You could do this using a static list too. We are using dynamic here…so select “Country_List” from the Data Set drop down menu. Be sure that the checkbox “Is Required” is selected. Select “COUNTRY” from the “Select Value Column” drop down menu. Select “COUNTRY” from the “Display Text” drop down menu. Be sure to check the checkbox labeled “Allow Multiple Values”. When it’s all done, click “OK”.
4. Make Table
5. Add ScriptThe last step is to select the Data Set “Orders_by_Country” and click on the script tab. This will open a Script Editor. There are 5 events that fire for this Data Set. Click on Script Event dropdown menu on the top left side of the script editor. Select “beforeOpen”. Now insert the following code: Preview/Run the Report.