Author Topic: Negative value in Text Box prompt displays blank report  (Read 62 times)

Offline cognos4321

  • Community Leader
  • *****
  • Join Date: Sep 2013
  • Posts: 102
  • Forum Citizenship: +0/-0
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

Offline cognos4321

  • Community Leader
  • *****
  • Join Date: Sep 2013
  • Posts: 102
  • Forum Citizenship: +0/-0
Re: Negative value in Text Box prompt displays blank report
« Reply #1 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.


Offline sdf

  • Statesman
  • ******
  • Join Date: Feb 2014
  • Posts: 396
  • Forum Citizenship: +3/-0
Re: Negative value in Text Box prompt displays blank report
« Reply #2 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.

 


       
Twittear