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

Cognos behaviour for Conditional Block & Render Variable

Started by jayatu, 28 Oct 2014 02:16:56 AM

Previous topic - Next topic

jayatu

Hi,

In a report we can use both Conditional Blocks & Render Variable to conditionally render some object (list/chart/crosstab). Does cognos treat these two methods differently while running queries?

Say I am displaying two crosstabs conditionally, will Cognos run the query for the both crosstabs or 1st identify which of the two is to be displayed and only run the respective query? Is this behaviour same if we use Conditional Block or Render Variable?

Thanks & Regards
Jayatu

cognos810

Hello Jayatu,
Cognos will only run the query for the container that is being rendered using a render variable. Same with conditional blocks. BUT, if you use box type none property of a container to simply hide it conditionally, the query is still run but not shown on display.

-Cognos810

sunny bachan prasad

Hi Cognos 810,

So you want to say that render variable and conditional blocks both work in same way as you have mentioned in the below mentioned post.
Cognos will only run the query for the container that is being rendered using a render variable. Same with conditional blocks" but as far as I know conditional block and render variable works differently. Correct me if I wrong

Thanks in advance

cognos810

Hello Sunny,
I am certain that conditional blocks do not send queries to the DB for the blocks that are not being displayed at the moment. It is based on my own findings like clocking the report and also observing SQL Server profiling. Please correct me if I am wrong.
You are correct in saying that both Render variable and Conditional block work differently, but not in this aspect. Only the query with the object being displayed is executed in both the cases.
Here are the differences:
1) Conditional blocks can work with objects as a whole. A whole chart, list, crosstab, blocks etc etc etc.
2) What if, you want to render/unrender a particular column inside a list? That is when render variable comes in handy.

On another note: For showing hiding 2 chart objects for example, either one of, the render variable or conditional blocks can be employed. But what if I am working with 10 chart objects? Yes it would work even then, but working in Report studio becomes much easier with 10 charts and conditional blocks.



sunny bachan prasad


elitole

Hi,

First of all, sorry to make this post alive again, but my question is regarding this and I thought it would be better to continue this thread.

My question is regarding the performance of using Conditional Blocks / Render variable.

I have been doing tests and I need to use this in order to decide what lists/crosstabs/charts choose depending on the user selection.

What I have discovered so far is that taking into account one option of the conditional block ( for instance,  x=1) I keep all the x=1 charts and I delete all the objects of the other options my report executes in 35 seconds, if I keep everything but I am selecting anyway x=1 ( so, all the objects for that option are the same) , the report needs 1 minute.

The conclusion is that the report is doing something but I dont know exactly what because if cognos was really processing everything it would have taken 5 minutes not 1.

I would highly appretiate if somebody give me some light on this. Has this happened to other people? How did you find a good workaround to save that time?

Thanks a lot in advance.