Hello, I noted that InstanceReportSource is now deprecated, what is wrong with instance report source?
Anyway, how can I replace this code that does not know anything about report parameters?
Looks like the TypeReportSource does not fills the parameters set, so that code should get parameters informations elsewhere?
string
ReportLibrary = oRepLib.ToString();
string
ReportName = oRepName.ToString();
Telerik.Reporting.Report report = WorkerWrapper.getTelerikReporting(ReportLibrary, ReportName);
foreach
(var p
in
report.ReportParameters)
{
object
oParam ;
if
(!spoolRequest.TryGetParameter(p.Name,
out
oParam))
{
if
(p.AllowNull ==
false
)
throw
new
InvalidOperationException(
"The parameter "
+ p.Name +
" is not optional on report "
+ ReportLibrary +
"."
+ ReportName);
}
p.Value = oParam;
}
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
new
Telerik.Reporting.Processing.ReportProcessor();
System.Collections.Hashtable deviceInfo =
new
System.Collections.Hashtable();
Telerik.Reporting.InstanceReportSource reportSource =
new
Telerik.Reporting.InstanceReportSource();
reportSource.ReportDocument = report;
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport(
"PDF"
, reportSource, deviceInfo);