Hi Telerik team,
in my ASP.NET reporting solution I need several requirements to be met:
- Support for DrillThrough reports
- Support for advanced parameters handling. I have 10s of parameters. Parameters are assigned to groups which can be expanded/collapsed in GUI. In one sentence - rendering and structure of parameters is too complicated to be handled by Telerik Reporting built-in mechanism.
My design is following:
I render input controls for report parameters on my own. These parameters are serialized to a single complex object after submit. This single complex object is set to currently processed report using following assignment:
protected
void
Button1_Click(
object
sender, EventArgs e)
{
// ...
((BaseReport)ReportViewer1.Report).Parameters = parameters;
// ...
}
Property named Parameters is defined in BaseReport class, which is base class for all my reports.
I assign Parameters property to my datasource parameter in ItemDataBinding event (ItemDataBinding event is defined in BaseReport class, as well).
private
void
BaseReport_ItemDataBinding(
object
sender, EventArgs e)
{
// ...
((ObjectDataSource)DataSource).Parameters[0] =
new
ObjectDataSourceParameter(
"compositeParameters"
,
typeof
(CompositeParameters), Parameters);
// ...
}
Here is the problematic situation:
- ReportViewer.Report is set to OuterReport in design time
- I run the app and view OuterReport
- OuterReport has DrillThrough capability, so I click a link and it navigates me to InnerReport
- I would expect that (ReportViewer1.Report == InnerReport). Problem is, that (ReportViewer1.Report == OuterReport).
Thus I'm not able to assign parameters in mentioned way (((BaseReport)ReportViewer1.Report).Parameters = parameters;) to InnerReport. In DrillThrough scenario, OuterReport is always stored in property ReportViewer1.Report of ASP.NET report viewer.
Is there a way how to access instance of InnerReport which is navigated using DrillThrough.
Is there any alternative design that would work with Telerik Reporting better?
Thanks for your help!
Jaro
P.S.: I'm expecting problems with refreshing of InnerReport after setting parameters to it. But that's another story.