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

Conditional Blocks vs Render Variable

Started by bloggerman, 29 Nov 2010 12:15:24 AM

Previous topic - Next topic

bloggerman

I have a requirement where i need to show a chart if user chooses chart as prompt option and crosstab if crosstab is chosen.
I know that recommended way to implement it is to use Conditional Blocks. But, i was thinking would it be ok to just put a table and
put render variables to hide and show. Waht would be the pros and cons of the two?

Second, when i use render variable the part that is hide doesnt become part of the report and doesn't use space in
the report. Does that mean it helps performance, technically, if not a lot, but, a little, atleast?

ksr

Rt...

using render variable absoulty improve the performance, because the particular object will be dropped during execution with out executing, so some span of time will be saved..

bloggerman

Thanks. Could you also shed some light on the first part.

ksr

The object we put in conditional blocks will be executed during execution of the report irrespective of the conditional block and current block values. during the presentation of the report, it checks the conditional block and current block, and based on the result of current block, the respective block and its contents will be displayed. So, here execution of all blocks will be happened even though only one block will be shown in the report. I thinkthis is overhead

bloggerman

Pardon my ignorance, but, what do you mean by Current block. Is that the container of the conditional block?

And, how does the whole scenario defer from Render Variable usage on say a table? I am trying to figure the differ and the prefered way between render variable and conditional block.

ksr

Properties of Conditional Block:

Block Variable: we may assign string variable for this property

(String variable may contain case statement or if .. else expression. The expression will be evaluated at run time and produces a value. If this value is matched with the value of current block property then that conditional block will be displayed..)

Current block: we set a value of string valiable

mrcool

Hi Guru's,

Can some one please confirm that using of conditional blocks will not send multiple queries to DB.
I am using conditional block with 3 list reports . Each report will appear based on the value selected in the prompt. I want to know whether cognos will send 3 queries to DB or send only single query to DB which is corresponding to the value selected in the value prompt.
Iam using cognos 8.4

Thanks,
Mrcool.

PRIT AMRIT

Will send only single query to DB which is corresponding to the value selected in the value prompt.

inu

Quote from: ksr on 29 Nov 2010 03:06:06 AM
The object we put in conditional blocks will be executed during execution of the report irrespective of the conditional block and current block values. during the presentation of the report, it checks the conditional block and current block, and based on the result of current block, the respective block and its contents will be displayed. So, here execution of all blocks will be happened even though only one block will be shown in the report. I thinkthis is overhead

HI ksr,
Your replies cleared somewhat of my daughts, according to you, render variable executes only the selected object, while in conditional block, all the blocks are executed.
Then in what case should i use conditional block, and when render variable.

Thanks and regards
Inam

sunny bachan prasad

Hi,
Can some body reply to INU question as I also have the same question. How to decide whether to go with render variable or conditional blocks.

Thanks in advance.

ajayhemanth

Hi All,

I GUESS, if you want to display/hide many elements (a group of elements) based on a condition then go with conditional block.
If you want to display/hide just a single element based on a condition then go with render variable.
Please excuse if i'm wrong.

Regards
Ajay