Conditional Highlighting from OnCreate Scripted Data

Options
jverly01
edited February 11, 2022 in Analytics #1
<p>I have a report with 3 datasets. The first data set [dataSet] gets the list of active employees. The other two datasets [avail_hours & labor_hours] use the list of employees from [dataSet] to get either the number of hours they were available [avail_hours] and the number of hours they recorded [labor_hours]. I use an OnCreate script to pull the information from the 2nd and 3rd dataset to present the value on the output of the report - see attached screenshot.</p>
<p> </p>
<p>I want to add a conditional format to the report to highlight any row that has 0.00 [labor_hours]. The normal Highlighting tool in BIRT doesn't work because I'm trying to use information from a different dataset than the main [dataSet]. </p>
<p> </p>
<p>Or am I missing the boat on being able to use the variable in the highlighting rules section?</p>
<p> </p>
<p> </p>
<p>Environment: BIRT 3.7.1</p>
<p> </p>

Comments

  • Clement Wong
    Clement Wong E mod
    edited November 16, 2016 #2
    Options
    <p>On the table detail row's <em>onCreate </em>event, you can add a script to highlight the row.</p>
    <p> </p>
    <p>For example:</p>
    <pre class="_prettyXprint _lang-">
    if (this.getRowData().getColumnValue("STATUS") == 'Resolved'){
    this.getStyle().backgroundColor = '#ff6666';
    }

    </pre>
    <p>Attached is an example with 1 dataset, but having extra datasets shouldn't be that different.</p>
    Warning No formatter is installed for the format ipb
  • <p>If you can also achieve same results as Clement prescribed without script but use the highlighting option under the properties.</p>