New to Telerik Reporting? Download free 30-day trial

Parameterizing the Graph

This article is part of the Demo report guide on getting started with Telerik Reporting. It demonstrates how to add a report parameter and change the graphDataSource of the graph so that the user can select a year based on which the graph will display the top five stores.

  1. Add a new SqlDatasource component for the graph with the following query:

    FROM         Sales.SalesOrderHeader
    ORDER BY Year
  2. Rename the data source to yearDataSource.

  3. Right-click outside the report. Select Report Parameters to add the report parameter of the year.

  4. Set ReportYear as in the following way:


  5. Right-click graphDataSource. Select Configure and click Next until the Configure data source command is displayed.

  6. Change the WHERE clause in the following way:

    WHERE  (YEAR(SOH.OrderDate) = @Year)
  7. Set Configure data source parameters dialog in the following way:


  8. Set Configure Design Time Parameters :

    • Name : @Year

    • Value : 2002As a result, the year that will be displayed by default will be 2002.

  9. Click Next and Finish.

Previewing the Result

Preview the result by clicking Preview > PrintPreview.

Report Parameter Preview

Next Steps

Previous Steps

In this article
Not finding the help you need? Improve this article