Display slq text
Hi,
I have a report where the user changes the date parameters by changing the
sql code from the data tab (
i.e. select * from sp_projected_income ( '3/1/2002' , '4/1/02' ) ORDER BY
MARKET_YEAR, MARKET_NAME_ABRV, MARKET_DATE ). Is there any way to pass
this sql text to a text box on my report header. I use the following code
( Report.GetAutoSearchDescriptionLines(Search_Desc.lines) on the
reportOnStartFirstPass event to get search dialog values. Is there away to
get the sql statement passed to the server?
TIA,
John Tomaselli
I have a report where the user changes the date parameters by changing the
sql code from the data tab (
i.e. select * from sp_projected_income ( '3/1/2002' , '4/1/02' ) ORDER BY
MARKET_YEAR, MARKET_NAME_ABRV, MARKET_DATE ). Is there any way to pass
this sql text to a text box on my report header. I use the following code
( Report.GetAutoSearchDescriptionLines(Search_Desc.lines) on the
reportOnStartFirstPass event to get search dialog values. Is there away to
get the sql statement passed to the server?
TIA,
John Tomaselli
This discussion has been closed.
Comments
provide this data. Here is an example to extract the TdaSQL object to read
the MagicSQLText property of the TdaSQL object. Here is an example.
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
You can then access the MagicSQLText property which is the SQL sent to the
server.
procedure TmyClass.Foo;
var
lSQL: TdaSQL;
begin
GetSQLObject(ppReport1, lSQL);
Showmessage(lSQL.MagicSQLText.Text);
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com