I have an unrelated XtraReport that has a subreport control that contains another report. I call it “unbound” in a report that has a field definition using a schema but is not tied to any DataSet, I create a DataTable using the data access level, and then pass that object to the DataSource property of the report.
So, I have the following code:
if (table.Rows.Count > 0)
{
report.DataSource = table;
report.SubPurchaseOrder.Report.DataSource = tableSubReport;
report.ShowPreviewDialog();
}
else
{
MessageBox.Show("No data to show.");
}
But what I get when using this approach is a very detailed report, presented below (see attached pdf , sorry in Spanish, but I think you understand this idea).
DevExpress, , , , , , , , , , ?
, , .
EDIT:
.
- . BeforePrint subreport :
((XRSubreport)sender).ReportSource.FilterString = "[IdPO_RO] = " + _idPurchaseOrder;
((XRSubreport)sender).ReportSource.Parameters["Id"].Value = _idPurchaseOrder;
, , , .