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

report on stored proc from within ms access

Status
Not open for further replies.

shalloran

Programmer
Feb 25, 2001
6
AU
I have an MSSQL database with an MS access interface.
I would like to print a report on a resultset that is generated by a stored procedure on the SQL database. The report is created and works correctly. It is set up to take a list of parameters and pass those to the stored proc.
How do I...

- set the values of the crystal report parameters based on user input from within access (text boxes, combo boxes, etc)
- execute the report query and display the print preview

...from within ms access?

(using access 97, crystal 7)

T.I.A.
 
At the moment the report itself contains the stored procedure call. I am creating the report using crystal API functions, namely:
- call PEOpenPrintJob
- <various api calls to set procedure location>
- call PESetNthParam for each parameter
- call PEOutputToWindow
- call PEStartPrintJob
- call PEClosePrintJob

The job number being generated by OpenPrintJob seems to be working for setting up the database location, SetNthParm and OutputToWindow, but PEStartPrintJob is returning false. The report flashes onto the screen for a fraction of a second and then disappears again with no reported error (other than a false return).



 
You probably need to logon to the server or DSN, but I am not as familiar with the direct API calls.

I would post this in the new Crystal forum for integration/distribution, I think it is forum number 768. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top