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

Difference between style variable and render variable

Started by inu, 25 Mar 2014 03:41:01 AM

Previous topic - Next topic

inu

Hi
Please exaggerate the difference betweeen Style Variable and render variable, when we use style variable , and when we need to use render variable. Which one is better.

Please give the example

Regards
Inam

MFGF

Hi

A Style Variable is a variable based on which an object can be conditionally styled.
A Render Variable is a variable based on which an object can be conditionally rendered.

Use a style variable when you want to control the style (font, colour, border etc) of an object conditionally
Use a render variable when you want to render (show/hide) an object conditionally

Neither is better. They each have a puropse. Use the appropriate type of variable for the appropriate task.

I'd humbly suggest you would benefit from some Cognos 10 Report Studio training. These kinds of basics are covered in the course and I'm sure you would learn a lot to help you in your role.

Cheers!

MF.
Meep!

Enrique

Hi @MFGF !!


  •   Use a style variable when you want to control the style (font, colour, border etc) of an object conditionally
          Use a render variable when you want to render (show/hide) an object conditionally

untill now i was doing (show/hide) an object conditionally with a "Style variable" (type box none..) and worked perfect since a while i asked myself about that , why exist both ?

After googling for a while , i can not find the different between both , but the guys of IBM dont seem to be kind of people that make things without porpuse.. so i wonder what can you do with Render variable that you can not do with Style variable and vice versa


If anyone have any Idee  would be nice to hear it   :))

thanks in Advance, Enrique

cognos-t

Hi Enrique,

render variables can be used on elements without a connection to a query. For example: If you want to render pages conditionally based on user's choise via prompt, render variables do the trick. Other examples are the conditional rendering of an object linked to the same data query (e.g. you want to display a list in excel - but you want to visualize the same data in a chart when the report is run in HTML) or the usage of images based on the output format (replacement of image by text when a report is executed in excel)

The main difference between render and style variables is the fact that render variables control if an object is rendered while style variables control how a constant object is rendered (in terms of font, border, etc).

Regards