COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: bogdaboco on 22 Dec 2005 05:15:52 AM

Title: [Solved] Is it a rule for parameter ?
Post by: bogdaboco on 22 Dec 2005 05:15:52 AM
When I use a prompt parameter in a visual element of my report, the prompt becomes obligatory?
Title: Re: IS IT A RULUE FOR PARAMETER?
Post by: BIsrik on 22 Dec 2005 05:22:09 AM
not always...By default it is yes. u can set that to optional.

Srik
Title: Re: IS IT A RULUE FOR PARAMETER?
Post by: bogdaboco on 22 Dec 2005 07:17:51 AM
Even if I put my prompt to optionnal, it stays obligatory. It appears to be due to the use of the prompt parameter in my report. Would it be?
Title: Re: IS IT A RULUE FOR PARAMETER?
Post by: bdybldr on 22 Dec 2005 07:37:50 AM
You need to make sure that it's set to optional in both the prompt and the filter.
Title: Re: IS IT A RULUE FOR PARAMETER?
Post by: MrO on 22 Dec 2005 07:59:46 AM
Quote from: bogdaboco on 22 Dec 2005 05:15:52 AM
When I use a prompt parameter in a visual element of my report, the prompt becomes obligatory?

Yes it will always become obligatory. When processing the report CRN wants to use it, so it tries to get it.

A workaround might be setting the default value on '' (empty), so your textbox will be blank.
Title: Re: Is it a rule for parameter?
Post by: Draoued on 22 Dec 2005 08:48:57 AM
What if you use ParamDisplayValue instead of Paramvalue ?


Please , read the board rule , and do not use upper cast for subject , like in all forums it s not needed to shout.
Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 22 Dec 2005 09:41:34 AM
Bogdaboco,
Please verify that both the filter and the prompt usage properties are set to optional.  This will prevent the prompt from becoming obligatory.  I just tried it and it works.

The parameter will not display anything if the user doesn't select a value.  You can get a round this by changing your "Optional" filter to the following:

?parametername? = 'ALL' OR fieldname = 'whatever'

Then, add a static choice of 'ALL' to the prompt value box and set the default value to 'ALL'

This will work.  Good luck...hope this helps.
Title: Re: Is it a rule for parameter ?
Post by: bogdaboco on 22 Dec 2005 10:15:35 AM
Sorry for just answering now...
Both the filter and the prompt usage properties are set to optional.
I think the problem does not come from here.
I can't also use a default value to resolve it, cause I am not using a filter like  "?prompt parameter? = 'anything'", but something like that "[afield] < ?prompt parameterOne?   and  [afield] > ?prompt parameterTwo?". Thus, my two prompts associated to  ?promptparameterOne? and ?prompt parameterTwo? become required....

Does anybody know a solution?
Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 22 Dec 2005 10:27:51 AM
What type of parameter are you using?  Is it a date range.  Please provide specifics about what you're trying to accomplish.
Title: Re: Is it a rule for parameter ?
Post by: bogdaboco on 22 Dec 2005 10:42:10 AM
I am using it many times, and it could any type!
MrO response woulnt be exact?

Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 22 Dec 2005 10:49:25 AM
Instead of using [afield] < ?prompt parameter1? and [afield] > ?prompt parameter2?

Use this...

[afield] in_range ?prompt parameter?

Set the following properties on the prompt:
Required = no
Multiselect = no
Range = yes

Hope this helps...I know it will work
Title: Re: Is it a rule for parameter ?
Post by: BIsrik on 23 Dec 2005 06:06:13 AM
if u r having a parameter on a report column then u can set that to optional...if u r having a static values for a prompt then u cannot set that to optional..

Srik
Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 23 Dec 2005 07:26:01 AM
I agree with you, Srik.  But it's not very likely that he's defining a range using a static prompt.  That's why I suggested this solution.

I believe he's using ParamDisplayValue.

bog, please keep us posted on this issue.  Thnx
Title: Re: Is it a rule for parameter ?
Post by: bogdaboco on 04 Jan 2006 11:16:18 AM
This topic was not dead!
Well, I m just trying to resuscitate it...
First, I am sorry for this very late answer, but i had to do some privileges...
I am rising up cause my problem is taking more and more criticity.

So. When I display a parameter, the associate filter becomes obligatory.
Just a few information:
I am not using ParamDisplayParameter; For two reason:
- First, I don t understand what does it change to use in  a calculated field  "paramDisplayValue
(?parameter?)" in pace of "?parameter?"...
-Secondly, when I use paramDisplayValue, a error message don t validate my calculated field, saying me that now, other part of my report contains errors. - I am using a crosstab with two requests, the second has been created by a section (section used as a header).

Well, if anybody can help me....

Thx for your responses.

I come back tomorrow.
Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 04 Jan 2006 11:36:53 AM
bog,
ParamDisplayValue is appears by default when you want to display a parameter in your report layout.  If you create a detail or group calculation, it must be a query item.

What error are you getting?  Have you tried using in_range in your filter instead of >= and <=?  See the instructions posted earlier.  I think this will solve your issue.
Title: Re: Is it a rule for parameter ?
Post by: bogdaboco on 05 Jan 2006 03:01:03 AM
QuoteParamDisplayValue is appears by default when you want to display a parameter in your report layout.

Can you give me more precisions?
How can I use it when I want to display a parameter?
Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 05 Jan 2006 07:28:31 AM
Drag and drop a calculation to your report.  Select "Layout" and click "OK."

Next, click the "Parameters" tab at the bottom and select your parameter.  When you drag it to the "Expression Definition" window, it automatically appears as ParamDisplayValue("ParameterName").
Title: Re: Is it a rule for parameter ?
Post by: bogdaboco on 05 Jan 2006 08:17:18 AM
Succeded!
I couldn't use in-range instead of >= and <= , cause only one of the date limit prompts had to be obligatory.
First, I had to divide my filter in two:
Fisrt filter : promptParameterDate > lowerLimit
Second filter: promptParameterDate < upperLimit
Then, I had to display my  parameter using a layout calculation with ParamDisplayValue.

Thx to everybody, especially to bdybldr!
Title: [Solved] Is it a rule for parameter ?
Post by: bogdaboco on 05 Jan 2006 08:18:42 AM
Quote from: bogdaboco on 22 Dec 2005 05:15:52 AM
When I use a prompt parameter in a visual element of my report, the prompt becomes obligatory?
Title: Re: Is it a rule for parameter ?
Post by: bdybldr on 05 Jan 2006 08:27:57 AM
Bog,
I'm glad it worked out for you.  Thanks for the update.  One question:  What is the purpose of your last post?  Is there still an issue?
Title: Re: [Solved] Is it a rule for parameter ?
Post by: bogdaboco on 09 Jan 2006 04:35:26 AM
[It was just a bad manip... ;) ]