Formatting of date being ignored and report parameters

2 posts, 0 answers
  1. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 17 Mar Link to this post

    I have two problems one being that no matter what i set the report format of a date to be it appears to be ignore when i have setup the propertyes correctly its still displaying the long date, as you can see there is screen shot their.


    Also how do i pass parameters in the code behind in the html 5 verison in the web form version I would have just done the following.


    1.Telerik.Reporting.TypeReportSource reportSource = new Telerik.Reporting.TypeReportSource();
    2.        reportSource.TypeName = "ApertureNetReport.AdviseCalanderReport, ApertureNetReport, Version=, Culture=neutral, PublicKeyToken=null";
    3.        reportSource.Parameters.Add(new Telerik.Reporting.Parameter("startDate", rdStartDate.SelectedDate.Value));
    4.        reportSource.Parameters.Add(new Telerik.Reporting.Parameter("EndDate", rdEndDate.SelectedDate.Value));
    5.        bookingReport.ReportSource = reportSource;
    6.        bookingReport.Visible = true;



  2. Katia
    Katia avatar
    241 posts

    Posted 22 Mar Link to this post

    Hello Philip,

    {0:R} format is not applied because the embedded expression {Today()} evaluates the value of a TextBox to a string.

    Instead of '{Today()}' you should use the following expression:

    = Today()

    This will be evaluated as a DateTime value and the required format will be applied.

    Regarding your second question, the same approach is valid if you are using HTML5 Report Viewer - How to: Set ReportSource for Report Viewers.
    You will need to pass the report source to the viewer's - HTML5 Report Viewer. The viewer's reportSource consist of report and parameters attributes, where report is the string description of the report that will be displayed, and parameters is a collection of paremeters' keys and values which will be sent to the report.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top