How to Change Date Format of Report Parameters of DateTime Type in report Parameter Panel?

1 Answer 14 Views
Telerik Trainer
Prabesh
Top achievements
Rank 1
Iron
Iron
Prabesh asked on 26 May 2025, 08:44 AM

Hi Telerik Team,

I'm using Telerik Reporting in an ASP.NET MVC application. I have a generic helper method to configure the Telerik Report Viewer using a UriReportSource. Here's the function:

public static class ReportExtension { public static IReportViewerBuilder GetReportViewerConfig(this HtmlHelper htmlHelper, string reportId, string reportSource, Dictionary<string, string> reportParams) { var uriReportSource = new UriReportSource { Uri = reportSource }; foreach (var param in reportParams) { uriReportSource.Parameters.Add(param.Key, param.Value); } return htmlHelper.TelerikReporting().ReportViewer() .Id(reportId) .ReportServer(new ReportServer() { Url = ReadConfigData.REPORT_SERVER_URL, Username = ReadConfigData.REPORT_SERVER_USERNAME, Password = ReadConfigData.REPORT_SERVER_PASSWORD }) .ReportSource(uriReportSource) .ViewMode(ViewMode.Interactive) .ScaleMode(ScaleMode.FitPageWidth) .PersistSession(false) .SendEmail(new SendEmail { Enabled = true }) .Parameters(new Parameters { Editors = new Editors { MultiSelect = EditorTypes.ComboBox, SingleSelect = EditorTypes.ComboBox } }) .EnableAccessibility(false); } }

The Problem:

I'm using DateTime parameters (e.g., dateFrom, dateUntil) in my reports, and they appear in the report

parameter panel with the format MM/dd/yyyy. I want to show these dates as dd/MM/yyyy.

 



My Questions:

1. Is it possible to customize the display format (e.g., dd/MM/yyyy) of DateTime parameters in the parameter input panel?

2. If not, is there any workaround — such as setting culture explicitly for the viewer?

Regards,

Prabesh Shrestha


1 Answer, 1 is accepted

Sort by
0
Justin
Telerik team
answered on 28 May 2025, 01:40 PM

Hello Prabesh,

Yes, it is possible to customize the Date Format of the DateTime parameters in the Report Viewer. For details, please see How to change report parameter date format in HTML5 MVC Report Viewer, which describes two possible solutions. 

I hope this helps.

Regards,
Justin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Telerik Trainer
Asked by
Prabesh
Top achievements
Rank 1
Iron
Iron
Answers by
Justin
Telerik team
Share this question
or