April 2nd, 2009, 03:37 PM
Execute SQL from crystal report when printing
Hello all. Please help me.
I have a crystal report.
I want to execute an Update query when the reports are printed.
In one of the tables that are a source for the report, i have field called "print_flag".
When anyone prints a document then i want to change that flag from "N" to "y".
Please help with this!!
From searching on web i found that there is a
"whileprintingrecords" function that we can use. But I dont know how to use an SQL stmt with it
I put the sql stmt in double inverted commas after the function but it did not work.
April 2nd, 2009, 08:56 PM
Re: Execute SQL from crystal report when printing
I have seen a way to do it
Set a Stored Procedure as Your datasource
In this Stored Procedure there are 2 parts
First : Update the table
Second : Execute the SELECT statement that generate the data that the rpt process
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!