Calendar for date parameter

7 posts, 0 answers
  1. Bill
    Bill avatar
    42 posts
    Member since:
    Feb 2011

    Posted 08 Oct 2011 Link to this post

    When I preview my report, I get the nice Telerik calendar control for my date parameter but in the web browser, I get the ugly HTML calendar which has no year selection etc.

    What could I be doing wrong?
    I have the Telerik Web UI DLL in my bin folder and the proper reporting dll
  2. IvanDT
    IvanDT avatar
    75 posts

    Posted 11 Oct 2011 Link to this post

    Hello Bill,

    The Preview in Visual Studio uses the Windows Forms Report Viewer, while when you view a report in a web page, you utilize the Web Report Viewer. The latter is a web control which utilizes the standard asp:Calendar control (not Telerik DateTimePicker) for its DataTime report parameter i.e. it is not a highly customizable control that allows to be styled. Additionally the report parameter area is in a separate iframe which makes the task of styling it impossible. The Report Parameter area provides out of the box UI support for the parameters that covers 98% of the user cases and for that reason it is not customizable. In order to achieve your requirement, you should create custom UI for the parameters and hook it up to the parameters via the Reporting API.


    the Telerik team

    Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

  3. David
    David avatar
    3 posts
    Member since:
    Aug 2012

    Posted 09 Jan 2012 Link to this post

    This is actually very dissappointing, since I tried the reporting module and bought it based on the preview look and feel of the reports.  Is there a way to gather an example on how to replace the standard calendar control with the radCalendar control?  I have spent a great deal of time trying to figure out why the calendar parameter UI was not formatted correctly until I run into this post.  Any help will be greatly appreciated.
  4. Bill
    Bill avatar
    42 posts
    Member since:
    Feb 2011

    Posted 11 Jan 2012 Link to this post

    As Telerik suggested, I decided to scrap using the built in parameter functionality as it is just too flimsy and time consuming to tweak.
    I simply added my own gui for filtering and filtered my datasource based on that.
    So much easier and less headaches.
    As a matter of fact for the most part I just re-used the filtering gui I had already created for the web page so when they open the report, it uses the same filtering.
  5. Steve
    Steve avatar
    10940 posts

    Posted 12 Jan 2012 Link to this post

    Hello David,

    The built-in report parameters' purpose is to provide basic UI that is available out of the box and that is enough for most scenarios. For other cases, when you require customization, you can hide all report parameters (Visible=false), create a custom parameter area and wire it up to the Report API e.g. use RadDatePicker for ASP.NET AJAX control and pass the input via the report API:
    Copy Code
    Copy Code
    Telerik.Reporting.Report report = (Telerik.Reporting.Report)this.ReportViewer1.Report;
    report.ReportParameters["MyParam"].Value = RadDatePicker1.SelectedDate;

    Kind regards,
    the Telerik team

    Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

  6. Ben
    Ben avatar
    7 posts
    Member since:
    Feb 2015

    Posted 13 Mar 2015 in reply to Steve Link to this post

    Would be nice to have an example of wiring custom parameters to the Report API instead of just stating this!!!!!!
  7. Stef
    Stef avatar
    3610 posts

    Posted 18 Mar 2015 Link to this post

    Hello Robert,

    The ASP.NET ReportViewer parameters area is immutable, thus using a custom UI is the approach for getting customizable parameters editors.

    For example use your own controls, and once the user saves the selection update the viewer's Reportsource.Parameters collection. The ReportSource.Parameters collection is mapped by key to the wrapped report's ReportParameters collection.
    For example:
    protected void SubmitButton_Click(object sender, EventArgs e)
            var newValue = DropDown1.SelectedValue;
            if (ReportViewer1.ReportSource.Parameters.Contains("Parameter1"))
                                ReportViewer1.ReportSource.Parameters["Parameter1"].Value = newValue;
                                ReportViewer1.ReportSource.Parameters.Add("Parameter1", newValue);

    In a web application, my recommendation is to use the HTML5 Report Viewer and the Reporting REST service available as of Telerik Reporting Q3 2013. The HTML5 viewer's parameters editors can be customized via Javascript.
    Examples with the viewer are available in the local Html5Demo and MvcDemo projects.

    I hope the provided information helps you.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top