Posted 26 July 2019, 7:40 am EST
Hi,
I am using Flexviewer to display a report with a sub-report in a winforms application. I am using xsd files as the datasource for the main and sub-reports. The problem is that while the main report displays correctly each time, the sub-report keeps showing earlier data even when the xsd file has been generated correctly when the user views the report with different parameters.
This is my code:
C1.Win.FlexViewer.C1FlexViewer c1FlexViewer1 = new C1.Win.FlexViewer.C1FlexViewer();
C1.Win.FlexReport.C1FlexReport report = new C1.Win.FlexReport.C1FlexReport();
c1FlexViewer1.UserAction += C1FlexViewer1_UserAction;
string reportfile = Application.StartupPath + "\\Reports\\TMProfFees.flxr";
// Sub-report
report.Load(@reportfile, "TMPmtAddDeductReport");
report.DataSource.ConnectionString = Application.StartupPath + "\\Reports\\TMPmtAddDeduct.xsd";
// Main Report
report.Load(@reportfile, "TMProfFeesReport");
report.DataSource.ConnectionString = Application.StartupPath + "\\Reports\\TMPmtDetail.xsd";
c1FlexViewer1.DocumentSource = report;
c1FlexViewer1.DocumentSource.GenerateCompleted += DocumentSource_GenerateCompleted;
c1FlexViewer1.StatusText = "Loading....";
c1FlexViewer1.Show();
c1FlexViewer1.Dock = DockStyle.Fill;
c1FlexViewer1.Cursor = Cursors.WaitCursor;
c1FlexViewer1.Enabled = false;
Thanks in advance.
Regards,
Alhad