Hello
I have a simple script that open the report, set the parameters and then save the report with data.
Usually, after the report was saved once with data, I can open the report in the designer and the data is loaded in the preview.
Reports without subreports works, but the same report with subreports doesn't (no preview is saved, but also no error occours).
In the designer, after preview I will save the report, following message box is show "The saved data is incomplete. Generate the data to save?".
Before save, I must go to the last page then the data will be saved with the report.
I think the same I have to do in .Net, but how? Or any other idea?
Script VB.Net:
Private m_rptDoc As ReportDocument = New ReportDocument
m_rptDoc.Load(reportFileName, OpenReportMethod.OpenReportByTempCopy)
m_rptDoc.ReportOptions.EnableSaveDataWithReport = True
for each para in m_rptDoc.DataDefinition.ParameterFields
'Set parameters
.....
next
m_rptDoc.SaveAs(m_rptDoc.FileName, True)
m_rptDoc.Close