COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cognos4321 on 16 Jul 2018 10:45:02 AM

Title: Negative value in Text Box prompt displays blank report
Post by: cognos4321 on 16 Jul 2018 10:45:02 AM
Hello experts,

We have report which filters on a on a numeric value entered in the Text Box Prompt.
The filter in the query says:
[Costing].[mCosting].[Variance Forecast] <?pVariance?
'pVariance' is the parameter used for the Text Box prompt.

It works fine with any positive number entered but shows a blank report for negative number.

Using Cognos Analytics
Database is TM1 cubes

Any help is appreciated.
Thanks in advance
Title: Re: Negative value in Text Box prompt displays blank report
Post by: cognos4321 on 17 Jul 2018 12:15:56 PM
I tired changing the prompt property 'Numbers Only' to 'Yes' or 'No' and I still get the same result.

I am guessing it's taking the negative sign '-' entered in the text box prompt as string and the filter in the query is on an integer.
I mean in the below mentioned query filter [Variance Forecast] is an integer.
[Costing].[mCosting].[Variance Forecast] <?pVariance?

I tried using cast function to make 'pVariance' parameter as integer but it still the same result.
I can't convert 'pVariance' to String else I'll get an error for the query filter that integer can't be compared with String

Please help.
Thanks.

Title: Re: Negative value in Text Box prompt displays blank report
Post by: sdf on 17 Jul 2018 12:58:41 PM
try something like this


[Costing].[mCosting].[Variance Forecast] <#prompt('pVariance', 'integer', '')#

I believe there are many ways to go around this.