Like me on Facebook Follow me on Twitter Register or    (Why?)
Demo Notes - Multiple Parameters
Each reportset (a group of reports) can have 1 or more parameters associated with it. Currently there are seven different types of parameters you can include; Calendar, Checkbox, CheckBoxList, DropDownList, ListBox, RadioButtonList, and TextBox.

Parameter values are passed to the accompanying report and can be used to filter the results of any query. In the example below I am using two DropDownList parameters. One is filled with a list a list of departments the other a list of states. The contents of any parameter types that include lists of items can be filled using a data query, a static list or a combination of both. In this example the list is filled with both data from the database and a static 'All Departments' option is added as a default.

The query for the report shown below has a token included that contains the value of the selected parameters:
SELECT E.FirstName, E.LastName, DATEDIFF(year,E.HireDate,getDate()) [Seniority Years], E.City, E.State,  D.Name Department  
FROM {oq}DNNStuff_SQLViewPro_Sample_Employees E INNER JOIN {oq}DNNStuff_SQLViewPro_Sample_Departments D
ON E.DepartmentId = D.DepartmentId
WHERE (E.DepartmentId = [PARAMETER:Department] OR [PARAMETER:Department] = -1)
AND E.State = [PARAMETER:State]
ORDER BY HireDate
Parameterized Report
Please choose a department and state from the list and click run
Department :

State :

Run
Privacy StatementTerms Of UseCopyright (c) 2004-2015 DNNStuff
Page generated in 0.1875203 seconds!