We have a .NET 2.0 app that we’ve recently converted from AR2 to AR7. This app generates PDF files as needed. This app works properly on development machines, meaning machines that have the AR7 development environment with license installed. We cannot get this app to generate a PDF file on a machine that does not have the AR7 development environment installed. The SectionReport.Run method raises the following error:
Outer exception: Exception has been thrown by the target of an invocation
Inner exception: Object reference not set to an instance of an object
Our assumption is that a runtime object, DLL for example, is missing, but we can’t determine what. Any suggestions? Code snippet (VB.NET):
Private rpt As GrapeCity.ActiveReports.SectionReport
rpt = New GrapeCity.ActiveReports.SectionReport
…
Dim xtr As New System.Xml.XmlTextReader(“”)
rpt.LoadLayout(xtr)
xtr.Close()
…
Dim AR7sqlString as String
AR7sqlString = “AR_CONSTRAINT_SUMMARY_REPORT < %P0 ||'/Line 1/Line 2/'%>, < %P1 ||'All'%>, < %P2 ||'All'%>, < %P3 ||'All'%>, < %P4 ||'All'%>, < %P5 ||'REPORTED'%>, < %P6 ||'2014/03/11 16:00:00'%>, < %P7 ||'2014/03/12 00:00:00'%>, < %P8 ||'#STOPS'%>, < %P9 ||'ALL'%>, < %P10 ||'All'%>, < %P11 ||'English'%>”
Dim ConnectionString as String = “”
Dim ReportDataSource As GrapeCity.ActiveReports.Data.SqlDBDataSource
ReportDataSource = New GrapeCity.ActiveReports.Data.SqlDBDataSource(ConnectionString, AR7sqlString, 300)
rpt.DataSource = ReportDataSource
rpt.Name = “”
…
rpt.Run(False) 'raises error