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!

xApi Printing bug

Status
Not open for further replies.

Silverf0x

Programmer
Jul 24, 2003
5
CA
I'm trying to print some basic reports (of PO Receipts)...

The COMAPI report printing class works fine.
When I use the xApi report printing class in a PD_PREVIEW mode it always prompt me an Email window (like if I was using the PD_EMAIL mode)
Every other mode works fine but the PD_PREVIEW mode seems to have a bug..

Is this a known ACCPAC issue ?

I'm using a VBA macro, ACCPAC Advantage Series 5.1A, ALL modules latest Service Packs

Here's the non-working code:

Dim rptObj As ACCPACXAPILib.xapiReport
Set rptObj = CreateObject("ACCPAC.xapiReport")
rptObj.Select Session2, "PORCP01[PORCP01.RPT]", ""
rptObj.PrintDestination = PD_PREVIEW
rptObj.SetParam "RCPFROM", RCPNumber
rptObj.SetParam "RCPTO", RCPNumber
rptObj.SetParam "QTYDEC", "0"
rptObj.SetParam "PRINTED", "1"
rptObj.PrintReport 1

'Session2 = some xApi session
'RCPNumber= PO Receipt number (ex.: RCP000021)


Thanx for ANY help on that !

-JP
 
You mentioned that you are using a VBA macro. Is this macro run from within ACCPAC or externally?

If it run from within then you may run into such bugs because the xAPI is designed to run externally while the COMAPI is designed to run within Accpac.

Thanks and Good Luck!

zemp
 
I'm running the macro internaly... I see what you mean, but is there a way for the xAPI report to show the PD_PREVIEW mode externally ??

If yes, how?

If not, why !??!

Thanx

-JP
 
I am not very familiar with the ins and outs of the xAPIReport. I do most of my reporting with Crystal directly, even in my xAPI programs. I will look into it and get back to you if I find anything.

Thanks and Good Luck!

zemp
 
From what I have been able to find you have everything you need. The only thing that I can think of is to try changing your order of operations. I have found the xAPI can be fussy over the order of operations. Try placing the .printdestination line right before the .printreport line.

Dim rptObj As ACCPACXAPILib.xapiReport
Set rptObj = CreateObject("ACCPAC.xapiReport")
rptObj.Select Session2, "PORCP01[PORCP01.RPT]", ""
rptObj.SetParam "RCPFROM", RCPNumber
rptObj.SetParam "RCPTO", RCPNumber
rptObj.SetParam "QTYDEC", "0"
rptObj.SetParam "PRINTED", "1"
rptObj.PrintDestination = PD_PREVIEW
rptObj.PrintReport 1


Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top