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

Is it possible: To have Crystal update a log table in a database? 2

Status
Not open for further replies.

hallux

Programmer
Feb 25, 2003
133
US
I would like to know if it is possible to update a table (write) froma Crystal Report. The formula or ? would write out the information to an Oracle table. I have many users of the reports I create and it would be helpful to have a log of:
1. Report name
2. Who is running the report
3. How long the report ran
4. Total records pulled
5. The parameters used in the query
6. Etc.

FYI: We use a vendor supplied application, I can only modify
the reports and add them to a report manager application for
customer viewing. I cannot modify the application.

(Crystal Dev 8.5)

Thanks,
-Brent
 
Hmmm, probably not if you're within another application.

Some potential options might be to pass the report information in parameters to a Stored Procedure, but as I recall, you can't write to a table or another Stored Procedure in an SP from Crystal.

You also might be able to leverage an Oracle log viewer to obtain some of that data.

-k
 
In CR9, you could use a SQL command as the source of your report. The SQL command can do things like INSERT and UPDATE to the DB prior to returning a record set to the report.

But as you are using a 3rd party app, that may not be possible.

Another solution would be a UFL you use in a formula in the report footer. Then all the Oracle log stuff gets done inside the UFL. (A UFL is a bit of VB code you call from inside a CR formula. They appear in the formula editor under "Other Functions"). I've seen such a UFL, and it wouldn't be hard to write one.

Editor and Publisher of Crystal Clear
 
I'll be installing CR 9 in the next month, so then I'll check it out. That would be one more reason to upgrade. I'm encouraging a client to upgrade to 9 this year.
Thanks,
-Brent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top