Like me on Facebook Follow me on Twitter Register or    (Why?)
Demo Notes - 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 a DropDownList parameter type and have filled it with a list of departments. 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 parameter:
SELECT E.FirstName, E.LastName, DATEDIFF(year,E.HireDate,getDate()) [Seniority Years], E.City, 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)
ORDER BY HireDate
Parameterized Report
Please choose a department from the list and click run
Department :

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