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!

Updating SQL Data from a generated report

Status
Not open for further replies.

Jhankins

Programmer
Jun 17, 2003
46
AU
Can you update table data while or after running a report. Based on calculations you do in a report.

cheers,
 
If you CAN I've never seen it done. Why not do it in your application after running your report?

In psuedo code something like....

Sub Button_Click()

Report1.Show

SQL = "Update table1 set blahblah = 'abc';"
Connection.execute SQL

End sub
 
This is version dependent.

If you think about Alex's solution, the application is passing SQL, the SQL is doing the update.

Version 9 allows for passing SQL, but more importantly, you can create a Stored Procedure to perform whatever updates you need.

I would take Crystal out of the picture entirely though.

If you insist on using a presentation program to update data, consider that you could read data in a Main report (remember this is version 9), pass it to a subreport, update from the subreport SQL, just make sure that you issue a select after the update so that Crystal gets a data set.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top