COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: Sandy10 on 24 Mar 2011 10:10:46 AM

Title: Function to get Report Name that user is running
Post by: Sandy10 on 24 Mar 2011 10:10:46 AM
Is there a function in FM to retrieve the Report Name.

I thought maybe reportlocale(), because I've seen it once here, but I can't find any info on this.
Thank you, very much.
Title: Re: Function to get Report Name that user is running
Post by: Lynn on 24 Mar 2011 11:11:47 AM
I would tend to think not...if you were running Query Studio or Analysis Studio what would it display?

There is a ReportName() function you can use in Report Studio which is available if you put it in a layout calculation, not in a query item expression.

I'll be interested to know the answer if you find out otherwise though!
Title: Re: Function to get Report Name that user is running
Post by: AussiePete2011 on 24 Mar 2011 07:38:17 PM
This is from the FM user guide

http://publib.boulder.ibm.com/infocenter/rentrpt/v1r0m1/index.jsp?topic=/com.ibm.swg.im.cognos.ug_fm.8.4.1.doc/ug_fm_i_cogrsreportfunctions.html

Cheers
Peter B
Title: Re: Function to get Report Name that user is running
Post by: Sandy10 on 25 Mar 2011 07:46:48 AM
Thanks, Yeah, the ReportName() function allows the report to get the name.

I was wondering if there was some function in the framework to access the reportname, that could then be used in a filter.  ie.  if 'reportname' = entry in user defined table, then ....

Thanks.
Title: Re: Function to get Report Name that user is running
Post by: Steve on 25 Mar 2011 12:32:36 PM
What are trying to achieve ?
Title: Re: Function to get Report Name that user is running
Post by: Sandy10 on 25 Mar 2011 01:18:31 PM
We want to give role level security base on the type of report and who the person is.
We want to pass the type of report from Report Studio to be used in a filter in the model.
This data will be joined to our Oracle Security Table.
Title: Re: Function to get Report Name that user is running
Post by: Lynn on 25 Mar 2011 04:55:00 PM
It seems to me that the "type of report" will be based on the type of data contained within it.

I would suggest you consider looking at the subject area that needs to be secured and approaching the problem from that direction.

Peel back one more layer of the onion and perhaps it is a category of information that needs connecting to your security roles for the security you require.

I don't think there is a way to expose a report name within FM for filtering (or any other) purpose since there are multiple ways/studios to use data from a published package beyond just pre-defined Report Studio reports.
Title: Re: Function to get Report Name that user is running
Post by: Steve on 25 Mar 2011 07:22:59 PM
I agree with Lynn.

Moreover, the Report Name does not really define the 'type of report' unless you can enforce a policy to have a naming convention of report names. I find that difficult to believe.

If you can be provide more details, I have done lots of these kind of securities where the security is set up in a table in the database.