I am working a on Silverlight solution using the ReportViewer and a subclass of Telerik.Reporting.Service.ReportService for the reporting service.
The report to be produce is about the same, every time, but I needed a way to provide some "parameters" from the client to the service in order to customize the report before generation.
I used the "ReportViewer.Report" property on the client side and a custom IReportResolver on the server side to transfert my information on the service side. This way, my custom IReportResolver could parse the information, instantiate and customize the report before generation.
Example:
Do you have any suggestions to workaround this issue ?
The report to be produce is about the same, every time, but I needed a way to provide some "parameters" from the client to the service in order to customize the report before generation.
I used the "ReportViewer.Report" property on the client side and a custom IReportResolver on the server side to transfert my information on the service side. This way, my custom IReportResolver could parse the information, instantiate and customize the report before generation.
Example:
Silverlight:
Service:
Everything work as expected when displayed in the ReportViewer, but when the user click the "save as" button, the "ReportViewer.Report" property value is NOT the one provided to the IReportResolver. The fully qualified name of the Report class is used instead.
<
tkr:ReportViewer
ReportServerUri
=
"../ReportingService.svc"
Report
=
"param1=X;param2=Y;etc"
/>
Service:
public
class
MyReportingService : ReportService, IReportResolver
{
public
MyReportingService ()
{
this
.ReportResolver =
this
;
}
ReportSource IReportResolver.Resolve(
string
report )
{
var myReport =
new
MyReport();
// Here I customize the "myReport" instance based on the
// value of the "report" parameter
return
new
InstanceReportSource() { ReportDocument = myReport };
}
}
Everything work as expected when displayed in the ReportViewer, but when the user click the "save as" button, the "ReportViewer.Report" property value is NOT the one provided to the IReportResolver. The fully qualified name of the Report class is used instead.
Do you have any suggestions to workaround this issue ?