subesse
22nd August 2016, 11:08
I created few queries, which all use the same report.
Now, based on the query I want to mail the report.
Is there a way to know from within my reportscript, which SQL was starting the current report?
bdittmar
22nd August 2016, 12:21
I created few queries, which all use the same report.
Now, based on the query I want to mail the report.
Is there a way to know from within my reportscript, which SQL was starting the current report?
Hello,
try:
string
prog.name$(16)
R
Name of current session.
Regards
bhushanchanda
22nd August 2016, 12:32
Hi,
If you are running SQL Query, then importing prog.name$ variable will always give you ttadv3280m000 as the value.
Instead, use this ->
declaration:
table tttadv380
string sql.query(20)
before.program:
sql.query = ttadv380.cqur
import("ttadv380.cqur",sql.query)
sql.query will have your calling query name.
subesse
22nd August 2016, 12:46
Hi Bhushan,
Smart thinking! Works perfectly.
Thanx a lot.