COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Phil Scottow on 28 Mar 2013 06:36:35 AM

Title: Adding server name to a prompt page
Post by: Phil Scottow on 28 Mar 2013 06:36:35 AM
HI
I believe the code to use is
select SYS_CONTEXT('USERENV','DB_NAME') from dual

1/ where is the best place to put this code Report or FM
2/ how do I use this code (newby)
Thanks in advance
Title: Re: Adding server name to a prompt page
Post by: Phil Scottow on 28 Mar 2013 08:01:06 AM
I have worked this out.
In Report Studio, Query Explorer at the top level (Queries)
Just drag in a SQL Insertable Object over
set SQL Server to Pas- Through ( I guess this is selectable depending on your environment)
set your data source ( ensure it is the same source as shown when you do any validating )
and for SQL enter your select statement ( mine was     select SYS_CONTEXT('USERENV','DB_NAME') from dual )
Validate...
goto your new Query and open it, then run  view tabular