Element Details: Conditional+Class
 Back


Available in: Logi Info Source code name: ConditionalClass

With a ConditionalClass, you can apply a different style sheet class depending on a value. For example, negative numbers can be shown in red with an script formula such as "@Data.value~ < 0". The class in the Class attribute will be used when @Data.value~ is a negative number.

You can include any number of ConditionalClass elements. The first condition that evaluates to "True" sets the class.



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
Class
UserDefined
(Required) Sets the Cascading Style Sheet class used by the element. When set, this class will also be used by all child elements that don't have their own class. The class should be defined in the report's style sheet file.
Condition
UserDefined
(Required) An expression that evaluates to a value of True or False. Expressions should be in JavaScript (recommended) or VBScript syntax. For .NET versions, the scripting language can be set in the _settings.lgx General element. For Java versions, the scripting language is always JavaScript. Typically, you would compare values using a token, such as "@Data.value~ < 0" or "@Session.ShowCol1~=='true'". Elements are removed when the Condition evaluates to False. Use quotes when working with strings: "@Data.myColumn~" == "SomeValue" If your data token may have a double quote inside of it, you should use single quotes: '@Data.myColumn~' == 'SomeValue' String valued data tokens with single and double quotes inside are not supported by the condition attribute.
ID
UserDefined
The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.



PARENT ELEMENTS

Click element to drill down for more information.

Action.Popup Menu
Analysis Grid
Analysis Grid Column
Body
Bullet
Button
Column Cell
Crosstab Table
Crosstab Table Header Column
Crosstab Table Label Column
Crosstab Table Summary Column
Crosstab Table Value Columns
Data Calendar Day
Data Calendar Rows
Data Multi-Column List
Data Table
Data Table Column
Data Tree
Division
Fieldset Box
Group Header Row
Group Summary Row
Header Row
Horizontal Rule
HTML Tag
Image
Input Checkbox
Input Combo List
Input Email
Input File Upload
Input Number
Input Password
Input Radio Buttons
Input Select List
Input Telephone
Input Text
Input Text Area
Label
Menu Branch
Menu Leaf
Menu Tree
Mobile Report
More Info Row
More Info Row Column
Popup Panel
Report
Report Footer
Report Header
Responsive Column
Row
Rows
Subdata Multi-Column List
Subdata Table
Summary Row
Text Cloud
Tooltip Panel
Widget


CHILD ELEMENTS

Click element to drill down for more information.



 Back to top


 Chart Debug