Hi everyone. I am calling a Custom Crystal Report from Accpac macro using Accpac API. I have recorded a macro to get the fill of the code and checked the web for tips on this proceedure. However, after modifying the OERPT.INI and placing my report in the OE60/ENG folder i am still getting the Crystal Reports parameter pop up.
Below is the VB Code
Below is the modified part of the .ini file
Could anyone help me to figure out why i am getting the Crystal pop-ups.
Kind regards
Boris
Below is the VB Code
Code:
On Error GoTo ACCPACErrorHandler
Dim report As String
report = "\\MCLERPSTORE\A4w\OE60A\ENG\MCL_SALES_INVOICE_FORM.rpt"
' TODO: To increase efficiency, comment out any unused DB links.
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkSysRW = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)
Dim rpt As AccpacCOMAPI.AccpacReport
Set rpt = ReportSelect(report, " ", " ")
Dim rptPrintSetup As AccpacCOMAPI.AccpacPrintSetup
Set rptPrintSetup = GetPrintSetup(" ", " ")
rptPrintSetup.DeviceName = "\\SALES-PC\HP LaserJet 3055 PCL"
rptPrintSetup.OutputName = "DOT4_001"
rptPrintSetup.Orientation = 1
rptPrintSetup.PaperSize = 1
rptPrintSetup.PaperSource = 15
rpt.PrinterSetup rptPrintSetup
rpt.SetParam "INVNUMBER", "IN12000001" ' Report parameter: 6
rpt.NumOfCopies = 1
rpt.Destination = PD_PREVIEW
rpt.PrintDir = report
rpt.PrintReport
Exit Sub
Code:
'************** Object id = Custom Invoice Report******************
'
[MCL_SALES_INVOICE_FORM]
heading=29150
crystal=MCL_SALES_INVOICE_FORM
orientation=portrait
paper size=1
optparams=1
2=INVNUMBER STRING 29155
Could anyone help me to figure out why i am getting the Crystal pop-ups.
Kind regards
Boris