Hi everybody,
I have a Main Report with four subreports, there is error on two new subreports when executing setdatasource(). Is there anyone knows where is the problem and how to fixed it Thanks.
Error message:
"CrystalDecisions.CrystalReports.Engine.InvalidArgumentException: Error in File C:\WINNT\TEMP\temp_545090ad-0e2b-4610-b0ad-55893596e485.rpt: Invalid table number.
at . J(String , EngineExceptionErrorID )
at . E(Int16
, Int32 )
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(Object value)
at .... in c:\<path>\<webpage>.vb:line 83"
[code]
'Loading Data From Databases
Me.LoadData("Summary", "storedproc1")
Me.LoadData("Details1", "storedproc2")
Me.LoadData("Details2", "storedproc3")
Me.LoadData("Details3", "storedproc4")
'crMainReport is Main Crystal Report object
Dim crSumSubreport As ReportDocument = Me.crMainReport.OpenSubreport("ITPReportSum1.rpt")
Dim crDetSubReport1 As ReportDocument = Me.crMainReport.OpenSubreport("ITPReportDetF1.rpt")
Dim crDetSubReport2 As ReportDocument = Me.crMainReport.OpenSubreport("ITPReportDetF2.rpt")
Dim crDetSubReport3 As ReportDocument = Me.crMainReport.OpenSubreport("ITPReportDet1.rpt")
crSumSubreport.SetDataSource(Me.dsGlobal.Tables("DocSummary"))
ViewState("DataSet1") = Me.dsGlobal.Tables("DocSummary")
crDetSubReport3.SetDataSource(Me.dsGlobal.Tables("DocDetails3"))
ViewState("DataSet4") = Me.dsGlobal.Tables("DocDetails3")
crDetSubReport2.SetDataSource(Me.dsGlobal.Tables("DocDetails2")) <<-- Error Here
ViewState("DataSet3") = Me.dsGlobal.Tables("DocDetails2")
crDetSubReport1.SetDataSource(Me.dsGlobal.Tables("DocDetails1"))
ViewState("DataSet2") = Me.dsGlobal.Tables("DocDetails1")
[/code]
***This problem has been RESOLVED ***
den2005

[RESOLVED] Invalid Table Number...