COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Deeor on 20 Jan 2011 08:02:58 PM

Title: How to pass data item value in a URL?
Post by: Deeor on 20 Jan 2011 08:02:58 PM
I am trying to pass a user selected value using a URL to another report. 

If I include a value in the URL (p_GEO='ASIA') it works no problem however I want to pass the value that the user clicks on.
How would I accomplish this?

I have the hyperlink Text Source set as a Data Item Value with the Value of GEO and the URL Source is a Report Expression that contains the URL.

.../content/package[@name='MyPkg']/report[@name='MyReport']&p_GEO=?&ui.action=run&ui.header=false&ui.toolbar=false&run.prompt=false

I know I could accomplish this using the Drill-Through definitions however I have a unique requirement that requires the use of a URL.  I appreciate any help I can get.

Thanks.
Title: Re: How to pass data item value in a URL?
Post by: melee on 20 Jan 2011 10:43:43 PM
Color me impressed - I didn't know you could trigger a report via GET variables.

Since I'm not sure EXACTLY how to do this, let me see if I can provide some ammo - please let me know how you end up doing this, as it could be a great benefit to others.

In order to pass the geo value in the URL, you're going to need to create a data item that builds the URL string. for example:

'<a href=".../content/package[@name='MyPkg']/report[@name='MyReport']&p_GEO=' || [Query1].[GEOCODE] || '&ui.action=run&ui.header=false&ui.toolbar=false&run.prompt=false">'


Give that a shot?