COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: badlad1990 on 18 Mar 2015 01:51:48 PM

Title: Report studio (display result by amount input)
Post by: badlad1990 on 18 Mar 2015 01:51:48 PM
Hi everyone,

I'm pretty new to cognos and I've been trying to get the report output based on a prompt where the user will type in the "Amount number" and get all the records related to that particular amount.

i tried the select and search prompt but with no luck. when i click on search ,it fetches that exact value and when i select that value and run the report it throws the "sql open result error".

Title: Re: Report studio (display result by amount input)
Post by: CognosPaul on 18 Mar 2015 01:58:13 PM
You'll need to be a bit more specific on your needs. Are you looking for all accounts that contain that amount or more? or less?

There are two sides to a prompt. There is the control and the filter itself.

The control you mentioned is a search prompt. That's generally used for finding values containing a specific string. It sounds like you might want a value prompt cascading against a text prompt.

So create a text prompt for numbers then create your value prompt. In the query for the value prompt add the account details, then set the filter to [Namespace].[Table].[Amount]<=?Amount? And add a button to refresh the page. This way the user can type in a number, press the button, and all accounts with amounts less than or equal to what the user entered will be displayed in the value prompt.
Title: Re: Report studio (display result by amount input)
Post by: badlad1990 on 18 Mar 2015 03:57:03 PM
Thanks very much for the quick reply , i am able to retrieve the data using the select search prompt but when the user is typing in a DECIMAL value it throws the sql open result error.
Title: Re: Report studio (display result by amount input)
Post by: BigChris on 19 Mar 2015 03:16:36 AM
Can you paste the error message in here? That might give us a bit more of a clue...
Title: Re: Report studio (display result by amount input)
Post by: CognosPaul on 21 Mar 2015 02:12:35 PM
Avoid the search prompt. When you need to search for individual accounts based on a variable value (less than, greater than, etc), use a text box prompt and a value prompt.