Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accpac Receipts

Status
Not open for further replies.

Rosb

Technical User
Feb 6, 2007
2
BB
Hi,

I have a client who wants to print multiple copies of their receipts from Accpac 5.4 onto one page.

With the CATS Receipts program it gave 2 styles.

Can anyone assist me in getting this information.

Thanks
 
If you don't want to use Crystal, I had a similar problem with the Check Register and wrote some VBA that formatted a report in Excel. The following snippet imported the AccPac report into Excel:


''' ************************************************************************************
''' Module: basAccPac Project: FPProject
'''
''' Description: Extract report data from AccPac
''' Note: Requires AccPac, ACCACXAPI 1.1, A4wcom.dll
'''
''' Date Developer Action
''' -----------------------------------------------------------------------------------
''' 2/18/2004 Frank Created
'''
''' ***********************************************************************************
Public Session As xapiSession
Public gLoginDB As String
Public gLoginID As String
Public gLoginPW As String

Sub Connect()
'Open a session with the database

On Error Resume Next

Set Session = CreateObject("ACCPAC.xapiSession")
Session.Open gLoginID, gLoginPW, gLoginDB, Date, 0

If Err.Number <> 0 Then
MsgBox "Could not open database", vbCritical, "Error Message"
MsgBox Err.Number & " " & Err.Description, vbCritical
Exit Sub

End If

BuildReport1
Set Session = Nothing
End Sub

Sub BuildReport1()
''' AccPac BK1450 report settings
On Error GoTo ACCPACErrorHandler

Dim rptObj As ACCPACXAPILib.xapiReport
Set rptObj = CreateObject("ACCPAC.xapiReport")

rptObj.Select Session, "BK1450", ""
rptObj.SetParam "FROMDATE", gFromDate
rptObj.SetParam "TODATE", gToDate
rptObj.SetParam "FROMBANK", gFromBank
rptObj.SetParam "TOBANK", gToBank

rptObj.SetParam "MULTICUR", "0"
rptObj.SetParam "ALIGN", "1"
rptObj.SetParam "VOID", "1"
rptObj.SetParam "OUTSTANDNG", "1"
rptObj.SetParam "BANKERR", "1"
rptObj.SetParam "NONNEGTBL", "1"
rptObj.SetParam "CONTINUEN", "1"
rptObj.SetParam "PRINTED", "1"
rptObj.SetParam "POSTERR", "1"
rptObj.SetParam "QUERY", "AND (STATUS=3 OR STATUS=6 OR STATUS=9)"
rptObj.SetParam "FUNCCUR", "USD"
rptObj.SetParam "FUNCDEC", "2"
rptObj.SetParam "FROMAPPL", " "
rptObj.SetParam "TOAPPL", "ZZ"

rptObj.PrintDestination = PD_FILE
rptObj.PrintReport PD_FILE

Set rptObj = Nothing

Exit Sub
ACCPACErrorHandler:

Dim Error As Variant

If Errors.Count = 0 Then
MsgBox Err.Description
Else
For Each Error In Errors
MsgBox Error.Description
Next

Errors.Clear
End If

Resume Next

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top