COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: KarenA on 16 May 2007 01:26:28 PM

Title: Trying to pass a number from my Prompt Page to the Report Page
Post by: KarenA on 16 May 2007 01:26:28 PM
I'm trying to create a report in Report Studio 8.1

On my prompt page I want to allow the user to enter in a dollar amount for a credit (I've added a text box prompt to do this).  I want to be able to use this amount in a calculation on my report page.  I can display my credit amount on the report, but I cannot perform any calculations or format it to currency. 

How do I set this up?
Title: Re: Trying to pass a number from my Prompt Page to the Report Page
Post by: JoeBass on 16 May 2007 02:09:38 PM
You should be able to create a Data Item, cast the parameter value inside and do math with it.  Then, format the result to currency with the data format property from the page layout.
Title: Re: Trying to pass a number from my Prompt Page to the Report Page
Post by: MDXpressor on 20 May 2007 10:32:29 PM
As a second option, you should be able to just drop a Layout Calculation on the page and pull in the prompted value.
Title: Re: Trying to pass a number from my Prompt Page to the Report Page
Post by: varshams on 21 May 2007 06:53:02 PM
Even i am facing the same problem. In my case user enters year and i need to subtract 10 from that year.
So if user enters 2007 , i need to get data from 1998 onwards. I tried adding data item. but i really cant do anything with that.
Can you explain with examples?

thanks,
varsha
Title: Re: Trying to pass a number from my Prompt Page to the Report Page
Post by: JoeBass on 22 May 2007 08:49:40 AM
Here is a report that uses the go sales and retailers package.  It has a layout calculation like MDXpressor suggested and a data item added to a query.  If you only need the item for display purposes, the layout calc will suit your needs.