Skip to Content
0
Former Member
Feb 10, 2011 at 10:51 PM

Invalid Pointer When Setting Subreport

80 Views

We are developing applications in VB.net using the Crystal Reports bundled with Visual Studio for Reporting. Reporting using ADO datasets. We have NUMEROUS reports that work fine. Just recently, after making changes to an rpt file that has multiple subreports, we are getting an Invalid Pointer error when trying to set the subreport using this line of code...

crSubReport = crReport.Subreports.Item("D2Report.rpt")

The variables have all been declared and initialized. Nothing in the code has changed - just the Rpt file.

I have been unable to find any help regarding this error in relation to setting the subreport. I have found it in relation to exporting large reports but that is not the case here.

Errors...

{"Invalid pointer

"}

System.Runtime.InteropServices.COMException: {"Invalid pointer

"}

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.get_Subreport(String Name) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_Subreport(String name) at CrystalDecisions.CrystalReports.Engine.ReportDocument.GetSubreport(String subreportName) at CrystalDecisions.CrystalReports.Engine.Subreports..ctor(ReportDocument doc) at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_Subreports() at CDS.Reporting.CreateReports.SetupFiledDocumentReport(SearchCriteria& robjRptInfo) in C:\_2010TFS\CampaignDisclosure\dotNet\DevCampaignDisclosureSolution\Reporting\CreateReports.vb:line 6212"

I have tried recreating the report (I saved the subreports from the original) . Made a new container report - added the groups then inserted the subreports. Still get the same error. This is a very complex report and recreating the entire thing from scratch could take days.

ANy help is appreciated.