Custom Date Picker in the web (Visual Studio) RRS feed

  • General discussion

  • I have created a report within Visual Studio using an SQL query to pull data defined in SQL Server Management Studio and am able to display this in the web. I have also created a chart within Visual Studio based on this report and this too displays in the web.

    However, what I would like to do is to have a date picker within the web so that you can define the scope of the chart. For example, a user can go into the web and decide that they want to see all the data from 1/11/2010 - 8/11/2010. All I can seem to see is how to filter the chart within Visual Studio, however, this isn't practicle from a user perspective.

    I can't seem to work out whether this can be done and if so, how! Is this possible? If it is, how do you do it?

    Thursday, November 25, 2010 2:27 PM

All replies

  • If I understand you correctly, you have an ASP.NET application with an RDLC report that contains a table and a chart.

    What you're asking is already a feature in server reports (RDL), hosted in SQL Server Reporting Services (SSRS). It is available for you to try in SQL Server Express with Advanced Services. A server report has built-in parameter-prompt area at the top of the viewer that lets users supply parameters - in your case, a date picker.

    To do this for your RDLC report, you must implement your custom parameter UI:

    1. Create parameters for your RDLC report, you need to do the following:
    2. Implement your custom parameter UI. For example, use the Calendar control in the ASP.NET AJAX Toolkit (
    3. Programmatically pass the parameters to your report using ReportViewer.LocalReport.SetParameters

    Cephas Lin This posting is provided "AS IS" with no warranties.
    Friday, December 3, 2010 5:02 PM