Hello developers,
we are using the DevExpress Reporting Library. Exporting the reports into rtf are working well till we combine two reports to one. Then as PDF the report is complete, but as rtf there are missing almost the complete report.
I don't know what you need to find out the problem. For the beginning I send you the reports as PDF and RTF. Maybe you see what's going wrong.
Thanks for Help.
Thien Egi
Hi Thien,
It is difficult to determine the exact cause of this issue without reproducing it. Send us you report creation and exporting code snippets. Alternatively, provide us with a simple working project that illustrates the issue in action. With a small example project, it is much easier for us to verify that the code that calls ours is valid, and that the way our controls are being used is recommended. This way, we can concentrate our resources on the problematic area:
A request for simple example programs
Your time and cooperation are greatly appreciated.
Thanks for answering. Unfortunately I can't create a simple program of this problem. Maybe it helps if I explain what we are doing.
We have a main report which can have more or less subreports which are created and added to the main report like that:
protected DetailReportBand AddSubReport(XtraReport reportPart)
{
DetailReportBand detailReport = new DetailReportBand();
DetailBand detail = new DetailBand();
XRSubreport subreport = new XRSubreport();
detailReport.Bands.AddRange(new Band[] { detail });
detailReport.Level = _nbSubReport;
detailReport.Name = "DetailReport" + (_nbSubReport);
detailReport.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
detailReport.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
detail.Controls.AddRange(new XRControl[] { subreport });
detail.HeightF = 23.00002F;
detail.Name = "Detail" + (_nbSubReport);
detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
subreport.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
subreport.Name = "subreport" + (_nbSubReport++);
subreport.ReportSource = reportPart;
subreport.SizeF = new System.Drawing.SizeF(187.25F, 23.00002F);
_report.Bands.Add(detailReport);
return detailReport;
}
This works fine and looks OK in all export variants.
Now we have a combiner, which combines two or more main reports to a huge report.
foreach (KeyValuePair<IReportData, string> keyValuePair in _reportDataList)
{
ReportPreview reportPreview = new ReportPreview(keyValuePair.Key, ~_filter);
reportPreview.CreateReport(true, keyValuePair.Value);
// Add all pages of the report to the end of the new report.
Pages.AddRange(reportPreview.Pages);
}
// Reset all page numbers in the resulting document.
PrintingSystem.ContinuousPageNumbering = true;
_reportDataList is our data source for the reports.
Now in the preview window and as PDF it looks fine, but as rtf, html, xls and image file there is only the combine report header without any main report which has been added by Pages.AddRange(reportPreview.Pages); This command is unique in our projects, so it's possible that there could be a problem inside it.
Can you help me?
Thank you for your time.
Thien Egi