Hi
I know, there are already a lot of article in this forum, that covers this topic.
I read a lot of them, and the documentation and watched a few videos ... i don't get this to work!
Please help.
Scenario:
MasterReport:
I have in the dataset "@BenutzerId" included in the query and this is used when filled the DataTable. Works fine.
The Subreport just looks the same:
Now, from an aspx-page, i call the report, set the values of the master-report and calling the loadReportData() of the master.
The report shows up, but only the report-header (filled thru master) is filled with datas. The detail section (filled thru subreport) generates an error or the whole subreport is invisible.
I try these things as well:
- using NeedDataSource in master (subreport_needDataSource) and/or subreport
- ItemDataBinding in master (detail_ItemdataBinding)
- Calling SubReport.loadReportData() from within the Master.loadReportData(), with setting the appropriate values of the subreport first
- Every combination af the aboved mentioned, and a few helpless tries more
- I even recoded the whole thing, trying to work with the integrated Report.Parameters as described in the help documentation ... no luck: designing-reports-master-detail.html
- I get it once to work: I hardcoded the correct values of "iOrderId" and "iSpracheId" in the subreport. So i think passing the parameters at the right time, in the right place, the right way, then it should work.
I'm sure, there has to be a simple way to do this.
TIA
Markus
I know, there are already a lot of article in this forum, that covers this topic.
I read a lot of them, and the documentation and watched a few videos ... i don't get this to work!
Please help.
Scenario:
MasterReport:
public partial class repRegisterConfirmMaster : Telerik.Reporting.Report |
{ |
private int iBenutzerId = -1; |
public int PARAMETER_BenutzerId |
{ |
get { return iBenutzerId; } |
set { iBenutzerId = value; } |
} |
private int iOrderId = -1; |
public int PARAMETER_OrderId |
{ |
get { return iOrderId; } |
set { iOrderId = value; } |
} |
private sbyte iSpracheId = -1; |
public sbyte PARAMETER_SpracheId |
{ |
get { return iSpracheId; } |
set { iSpracheId = value; } |
} |
public repRegisterConfirmMaster() |
{ |
InitializeComponent(); |
} |
public void loadReportData() |
{ |
this.dsBenutzerKundeAdresseKontaktTableAdapter1.Fill(this.dsBenutzerKundeAdresseKontakt.dsBenutzerKundeAdresseKontaktTable, iBenutzerId); |
} |
I have in the dataset "@BenutzerId" included in the query and this is used when filled the DataTable. Works fine.
The Subreport just looks the same:
public partial class subRegisterConfirmModul : Telerik.Reporting.Report |
{ |
private int iOrderId = -1; |
public int PARAMETER_OrderId |
{ |
get { return iOrderId; } |
set { iOrderId = value; } |
} |
private sbyte iSpracheId = -1; |
public sbyte PARAMETER_SpracheId |
{ |
get { return iSpracheId; } |
set { iSpracheId = value; } |
} |
public subRegisterConfirmModul() |
{ |
InitializeComponent(); |
} |
public void loadReportData() |
{ |
this.dsKundenModulByOrderIdTableAdapter1.Fill(this.dsKundenModulByOrderId.dsKundenModulByOrderIdTable, (byte) iSpracheId, iOrderId); |
} |
Now, from an aspx-page, i call the report, set the values of the master-report and calling the loadReportData() of the master.
... ReportViewer1.Report = new repRegisterConfirmMaster(); |
(ReportViewer1.Report as repRegisterConfirmMaster).PARAMETER_BenutzerId = 77; |
(ReportViewer1.Report as repRegisterConfirmMaster).PARAMETER_OrderId = 94; |
(ReportViewer1.Report as repRegisterConfirmMaster).PARAMETER_SpracheId = S.SpracheId; |
(ReportViewer1.Report as repRegisterConfirmMaster).loadReportData(); |
The report shows up, but only the report-header (filled thru master) is filled with datas. The detail section (filled thru subreport) generates an error or the whole subreport is invisible.
I try these things as well:
- using NeedDataSource in master (subreport_needDataSource) and/or subreport
- ItemDataBinding in master (detail_ItemdataBinding)
- Calling SubReport.loadReportData() from within the Master.loadReportData(), with setting the appropriate values of the subreport first
- Every combination af the aboved mentioned, and a few helpless tries more
- I even recoded the whole thing, trying to work with the integrated Report.Parameters as described in the help documentation ... no luck: designing-reports-master-detail.html
- I get it once to work: I hardcoded the correct values of "iOrderId" and "iSpracheId" in the subreport. So i think passing the parameters at the right time, in the right place, the right way, then it should work.
I'm sure, there has to be a simple way to do this.
TIA
Markus