×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

xApi Printing bug

xApi Printing bug

xApi Printing bug

(OP)
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

RE: xApi Printing bug

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

RE: xApi Printing bug

(OP)
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

RE: xApi Printing bug

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

RE: xApi Printing bug

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close