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

Using the API through MS Access

Using the API through MS Access

Using the API through MS Access

(using access 97, crystal 7.0 report generated by crystal reports 8, windows 2000)

I am trying to generate a report based on a stored procedure in an MSSQL database which has an MS Access front end interface.

At the moment I am creating the report using crystal API functions, namely:
 - call PEOpenPrintJob
 - <various function calls to ready the database>
 - call PESetNthParam for each parameter
 - call PEOutputToWindow
 - call PEStartPrintJob
 - call PEClosePrintJob

PEOpenPrintJob is returning a jobnumber as expected.
There are 10 parameters to the procedure, and PESetNthParam is returning true (working correctly) for each of these.
PEOutputToWindow returns true.
PEStartPrintJob returns false.
Given that the only variable parameter to PEStartPrintJob is the jobnumber, and given that this jobnumber has been used successfully in all API calls from PEOpenPrintJob, I do not understand how PEStartPrintJob is failing. The report window appears on screen for a fraction of a second, then disappears without an error message.


RE: Using the API through MS Access

OK, I'll try that, thanks. What has me worried is that there
are other reports already in the access interface that work correctly (but don't take parameters), and which call the same print engine functions (except for PESetNthParam).

RE: Using the API through MS Access

Would youknow anything about the RDC Object Model

RE: Using the API through MS Access

MPADC: You'll find it easier to get a response if you start a new thread rather than tack that on the end of another. You may care to post a more detailed quesiton about the Object Model and then I can answer it for you

David C. Monks
Accredited Seagate Enterprise Partner

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