cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Getting error "Invalid report file path" when setting OpenSubreport property. Path is correct. Other reports open up fine. Is there a better way to set this property?

oReportFile.Load(sRptFilename)

RptFormulaFieldDefinitions = oReportFile.DataDefinition.FormulaFields

oReportFile.SetDataSource(ReportData)

frmReportViewer.CRViewer.ReportSource = oReportFile

If sRptFileCopy <> "" Then

oReportFileCopy.Load(sRptFileCopy)

RptFormulaFieldDefinitionsCopy = oReportFileCopy.DataDefinition.FormulaFields

End If

oReportFileSub.OpenSubreport(sSubReportPath) c:\reports\Feeticket.rpt

oReportFileSub.SetDataSource(ReportDataSub)

0 Likes
View Entire Topic
Former Member
0 Likes

Yes the report is already imbedded in the main report. I changed the code to pass the name of the sub report, but I still get the error.

.OpenSubreport("feeticket.adj")