Standard Report DLL used in a non-standard way

Have you had any luck with this? I am trying to do almost the same thing with the same error

We are on 8.03.406a SQL and would like to batch print selected older posted AR Invoices and have found that we cannot print more than one at a time via Invoice Tracker.

The technical approach we are trying to use is a direct call to the "Epicor.Mfg.UIRpt.ARInvForm.dll" from a new menu item and using a form customization to pass an invoice number(s) to ReportParam.InvoiceNum via an EpiNumericEditor field (would like to swap this for an EpiUltraGrid on a CustomSheet with a search once we get the initial functionality where it needs to be).

I am getting the following error whenever I Preview or Print which leads me to believe that I am not passing the Invoice Number or other needed variables successfully.

"Error Detail
============
Object reference not set to an instance of an object.


Stack Trace
===========
at Epicor.Mfg.UI.Rpt.ARInvForm.Transaction.preSubmit()
at Epicor.Mfg.UI.Rpt.ARInvForm.Transaction.adapterSubmitToAgent(String agentID, Int32 angetSchedNum, Int32 agentTaskNum)
at Epicor.Mfg.UI.FrameWork.EpiReportTransaction.SubmitToAgent(String agentID, Int32 angetSchedNum, Int32 agentTaskNum)"

The base code for this DLL uses the following and would seem to indicate that some set of Global Variables are being look for rather than the report parameters we are trying to pass:

"Module Script

Private csm As Epicor.Mfg.UI.Customization.CustomScriptManager
Private oTrans As Epicor.Mfg.UI.Rpt.ARInvForm.Transaction

Private WithEvents ARInvForm As Epicor.Mfg.UI.Rpt.ARInvForm.ARInvForm
Private WithEvents ARInvFormParam_Column As System.Data.DataTable
Private WithEvents ReportParam_Row As Epicor.Mfg.UI.FrameWork.EpiDataView


Sub InitializeGlobalVariables(csm1 As Epicor.Mfg.UI.Customization.CustomScriptManager)

csm = csm1
oTrans = CType(csm.GetGlobalInstance("oTrans"), Epicor.Mfg.UI.Rpt.ARInvForm.Transaction)
ARInvForm = CType(csm.GetGlobalInstance("ARInvForm"), Epicor.Mfg.UI.Rpt.ARInvForm.ARInvForm)
ARInvFormParam_Column = CType(csm.GetGlobalInstance("ARInvFormParam_Column"), System.Data.DataTable)
ReportParam_Row = CType(csm.GetGlobalInstance("ReportParam_Row"), Epicor.Mfg.UI.FrameWork.EpiDataView)

End Sub



Sub DestroyGlobalVariables()

csm = Nothing
oTrans = Nothing
ARInvForm = Nothing
ARInvFormParam_Column = Nothing
ReportParam_Row = Nothing

End Sub"

Have you had any success with using the "Epicor.Mfg.UIRpt.ARInvForm.dll" or any other standard Epicor report DLL in this way?

What steps might we be missing in our hand-off to the DLL to ensure that Invoice Number is successfully passed to the Report Parameter?

How might we interrupt the Global Variables being looked for in the base code and replace them with defined user-selected variables?

Thanks in advance for any suggestions you can offer.

Best regards,
________________________________

Nathan Bonner
Business Systems Analyst
Total Plastics, Inc.
269.553.5838 (Office)
269.344.0711 (Fax)
bonner.n@...