I am using VB6, Crystal reports 11 and Sage Accpac 5.4.
I am trying to populate the report OEPICK01, however, when the report is previewed, all that appears on the report is the company name. No other values are displayed.
I am not accessing the OE1300 UI at all. The values are either determined through code or are accessed by values from a recordset.
Several values used below are passed from a calling function.
Here is the code that is used to access the report.
I have recorded a macro and the values seem to match what I already have. The only difference is the session handle, which I also do not know how it is determined and the macro is COMAPI whereas my code is xapi.
I have also tried accessing the OEFlag table using the following:
After trying this, I am still viewing a blank report.
Could anyone provide some insight as to why I cannot populate the report?
I am trying to populate the report OEPICK01, however, when the report is previewed, all that appears on the report is the company name. No other values are displayed.
I am not accessing the OE1300 UI at all. The values are either determined through code or are accessed by values from a recordset.
Several values used below are passed from a calling function.
Here is the code that is used to access the report.
Code:
Dim xPSRpt As ACCPACXAPILib.xapiReport
Set xPSRpt = CreateObject("ACCPAC.xapiReport")
With xPSRpt
.Select qmSESS, l_strReport, "" 'l_strReport = OEPICK01[OEPICK01.rpt]
.SetParam "CMPNAME", qmSESS.Company
.SetParam "SELECTBY", "0"
.SetParam "SORTBY", "1"
.SetParam "FROMSELECT", m_strOrdSplit(0)
.SetParam "TOSELECT", m_strOrdSplit(1)
.SetParam "FROMLOC", "1"
.SetParam "TOLOC", "ZZZZZZ"
.SetParam "REPRINT", "1"
If g_bolFractionalQty Then
.SetParam "QTYDEC", "4"
Else
.SetParam "QTYDEC", "0"
End If
.SetParam "COMPLETED", "0"
.SetParam "PRINTKIT", "0"
.SetParam "PRINTBOM", "0"
.SetParam "PRINTBY", "0"
.SetParam "SESHNDL", "11111111"
.PrintDestination = PD_PREVIEW '= PD_PRINTER
.PrintReport 1
End With
I have recorded a macro and the values seem to match what I already have. The only difference is the session handle, which I also do not know how it is determined and the macro is COMAPI whereas my code is xapi.
I have also tried accessing the OEFlag table using the following:
Code:
Set OEFLAG2 = qmSESS.OpenView("OE0270", "OE")
With OEFLAG2
.Init
.Fields("FROMORDER").Value = m_strOrdSplit(0)
.Fields("TOORDER").Value = m_strOrdSplit(1)
.Fields("FROMLOC").Value = "1"
.Fields("TOLOC").Value = "ZZZZZZ"
.Process
End With
After trying this, I am still viewing a blank report.
Could anyone provide some insight as to why I cannot populate the report?