Hi,
I need to pass the culture by parameter to a report (TypeReportSource), in the code behind (server side).
From the report side (server side) I need to get the culture passed by report parameter to the report itself.
I tried to to do this with the following code:
Dim cultureInfo As Globalization.CultureInfo = New Globalization.CultureInfo("pt-PT")
Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo Threading.Thread.CurrentThread.CurrentCulture = cultureInfo
This works before the 'InitializeComponent()' function as expected, but I have no way of retrieving the report parameters at this stage because they weren't initialized yet.
The main idea is to replace "pt-PT" with the report parameter sent when the report was invoked.
The following code shows how I invoke the report and pass it the required parameters:
Dim clientReportSource As New Telerik.ReportViewer.Html5.WebForms.ReportSource clientReportSource.IdentifierType = Telerik.ReportViewer.Html5.WebForms.IdentifierType.TypeReportSource clientReportSource.Identifier = "SIC.UI." & report & ", SIC.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" clientReportSource.Parameters.Add("P1", p1) clientReportSource.Parameters.Add("P2", "pt-PT") reportViewer1.ReportSource = clientReportSource reportViewer1.Page.Title = report
I'm trying to do exactly what you guys have in this demo, but so far unsuccessfully.
I've been digging through the forums and documentation for a few days now and i just can't get this to work.
Any help would be greatly appreciated.
Thanks in advance,
Nuno.
I need to pass the culture by parameter to a report (TypeReportSource), in the code behind (server side).
From the report side (server side) I need to get the culture passed by report parameter to the report itself.
I tried to to do this with the following code:
Dim cultureInfo As Globalization.CultureInfo = New Globalization.CultureInfo("pt-PT")
Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo Threading.Thread.CurrentThread.CurrentCulture = cultureInfo
This works before the 'InitializeComponent()' function as expected, but I have no way of retrieving the report parameters at this stage because they weren't initialized yet.
The main idea is to replace "pt-PT" with the report parameter sent when the report was invoked.
The following code shows how I invoke the report and pass it the required parameters:
Dim clientReportSource As New Telerik.ReportViewer.Html5.WebForms.ReportSource clientReportSource.IdentifierType = Telerik.ReportViewer.Html5.WebForms.IdentifierType.TypeReportSource clientReportSource.Identifier = "SIC.UI." & report & ", SIC.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" clientReportSource.Parameters.Add("P1", p1) clientReportSource.Parameters.Add("P2", "pt-PT") reportViewer1.ReportSource = clientReportSource reportViewer1.Page.Title = report
I'm trying to do exactly what you guys have in this demo, but so far unsuccessfully.
I've been digging through the forums and documentation for a few days now and i just can't get this to work.
Any help would be greatly appreciated.
Thanks in advance,
Nuno.