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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the API through MS Access

Status
Not open for further replies.

shalloran

Programmer
Feb 25, 2001
6
AU
(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.
*but*
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.

T.I.A.



 
shalloran: The clue is that your report appears for a fraction of a second and then disappears. This was a known problem with the Active X viewer. I suggest you download the patch for this from the website at
HTH David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
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).





 
Would youknow anything about the RDC Object Model
 
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
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top