Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
UI/UX Tools
CMS
Free Tools
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:
UriReportSource
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
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); } }
I'm using DateTime parameters (e.g., dateFrom, dateUntil) in my reports, and they appear in the report
DateTime
dateFrom
dateUntil
parameter panel with the format MM/dd/yyyy. I want to show these dates as dd/MM/yyyy.
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
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.