If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Prompt page controls using the same render variable

Started by rteruyas, 17 Jan 2018 02:41:58 PM

Previous topic - Next topic

rteruyas

Good day guys

I've been asked to change one of the controls in my prompt page depending on the type of user executing the report:
- If user is type "A", then we show a value prompt with only the values he can choose
- If user is type "B", then we show a text box prompt so he can query all values

I tried to create a render variable for both the valuePrompt and textBox.
It works for typeA, but for some strange reason, when a "B" user runs the report, it shows them both controls. I've checked my logic a few times and can't seem to find anything weird related to it.

A few details I checked:
- both controls set the same parameter
- the filter using the parameter is not mandatory in the query
- sometimes I execute the report and I don't get the prompt page at all

Any idea what I might be missing?
I'm using 11.0.7. Thanks in advance!
Happy Reporting!
[Ray]

CognosPaul

Can you post the exact logic you're using to get the user type and the render variable expression?

rteruyas

Thanks @CognosPaul
I've created a test report in the public cognos environment;  the report specification is attached

In real world, userType comes from the database, so there is no problem getting that.
What I can't figure out yet is why when userType is '1', it works as expected, but when the value is '2', it shows all controls. I thought it was something in my logic, but there is a text field that works fine using the same render variable.

Any ideas what I'm missing?


Happy Reporting!
[Ray]

rteruyas

Happy Reporting!
[Ray]

CognosPaul

This is insanity.

I see exactly what you're seeing. We can get the desired results by sticking the prompts into a conditional block instead of using render variables.

Open a PMR, the workaround is good for this example, but it's really insufficient

rteruyas

#5
Thanks @CognosPaul

I just reported it. I'm waiting to get an APAR number.
This is what I got from customer support

"There isn't an issue with the way the report is designed.  The problem appears to be specific to Text Box prompt object not observing the Render Variable setting so is always being rendered when the report is run.  The Value Prompt is working as expected with regards to rendering.
I'm reporting this to development and will followup with an APAR reference number for this issue."


QuoteWe can get the desired results by sticking the prompts into a conditional block instead of using render variables
That's correct. Also, if I use a block and put the text box prompt inside, it works  ::)

Thanks for testing!
Happy Reporting!
[Ray]