Illuminate BI Tool Guide
  • Introduction
  • Example BI Reports
  • What is BI Reporting in Illuminate?
  • Getting Started Using BI with Custom Reports
    • Setup Jaspersoft Studio
    • Prepare Your Data Set
    • Create a Basic Jasper Report
    • Publish My Report to Illuminate
    • Edit Report After Publishing
    • Display Selected Filters on Your Report
  • Get Started Using BI with SQL
    • Access Data Via ODBC Connection
    • Learn the Schema
    • Setup Jaspersoft Studio for SQL
    • Create a Basic Report with SQL
    • Publish My Report (SQL Method)
    • Adding Input Controls
  • Tutorials
    • Tutorials for Free Version ("Community Edition")
      • Tutorial 1: Categorize and Aggregate Your Data
      • Tutorial 2: Using Jasper Report Bands
      • Tutorial 3: Student Roster Report
      • Tutorial 4: Student Roster with SQL
      • Tutorial 5: Summary of Performance
      • Tutorial 6: CELDT Longitudinal Summary
    • Tutorials for Pro Version ("Professional Edition")
      • Tutorial 1: Aggregate and Visualize Your Data
        • Step 1 - Create a Custom Report
        • Step 2 - Download Your Data
        • Step 3 - Create a Data Adapter
        • Step 4 - Duplicate Template. Link Data Adapter
        • Step 5 - Set Class for Numeric Fields
        • Step 6 - Add & Configure Chart
        • Step 7 - Resize Chart. Preview Report.
        • Step 8 - Change Chart Labels
        • Step 9 - Set Chart Colors
        • Step 10 - Repeat for Other Data Points
        • Step 11- Install Your Report
      • Tutorial 2: Using Report Bands
        • Step 1 - Duplicate Report from Tutorial 1
        • Step 2: Create Your Group
        • Step 3: Create a Sort Field
        • Step 4 - Copy & Paste Your Chart
        • Step 5 - Set Reset Type and Evaluation Time
        • Step 6 - Change the Category Level
        • Step 7 - Add Site Name Field
        • Step 8 - Grade Level Sorting
    • CrossTabs Tutorial - Create, Format, and Style a CrossTab
      • Step 1 - Create Your CrossTab
      • Step 2 - Size and Position Your CrossTab
      • Step 3 - Format and Style Your CrossTab
  • Homework 1 - BI Workshop Follow Up
  • BI Tool Cheat Sheet
  • JasperSoft Studio Tips, Tricks, & FAQs
    • Basics of Writing Expressions in JSS
    • Rounding Decimals
    • Working with Dates in JSS
    • Conditional Styling in JasperSoft
    • Custom "No Data" Message
    • Create Multiple Summary Bands
    • Create Hyperlinks or "Tabs" to Connect Sets of Reports
    • JSS Community Edition
      • Adding Data Labels to Your Chart
      • Customizing Colors in Your Charts
    • JSS Professional Edition Only
      • HTML5 Charts
        • Data Labels: Enable, Customize, & Round Data Labels
        • Tooltip: Customizing the Tooltip
        • Keeping Colors Consistent in HTML5 Charts
        • Adding Drill Down to a Chart
        • Prevent Tooltip from Being Cut Off
        • Sort the Bars in Your Stack - Ordering the Series in Your Chart
        • Passing Parameters/Data Between Datasets with HTML5 Charts
        • Add Plot Lines to your Chart
        • Add Colored Zones or Plot Bands to Your Chart
        • Change Bar Colors Based on Bar Value
    • Rolling Over Your BI Tool Reports
    • "Current" Columns in Custom Reporting - To Use or Not to Use?
  • Report Design Best Practices
  • Installing the Illuminate Font Set
  • Report Templates
    • Blank Templates - Report Starters
    • Using the Report Templates
    • Multiple Measures Site Comparison Report (Tutorial 5)
    • EL Reclassification Report
    • EL Reclassification Report v2
    • RFEP Monitoring Report
    • Student Rubric Template
    • Michigan Report Templates
      • PSAT and SAT College Readiness Report
  • BI Tool User Community
Powered by GitBook
On this page
  • Plain Text in Expressions
  • Equations
  • Conditional Expressions (i.e. “If, Then” Statements):
  • Nested Conditional Expressions
  • “And” / “Or” Logic

Was this helpful?

  1. JasperSoft Studio Tips, Tricks, & FAQs

Basics of Writing Expressions in JSS

PreviousJasperSoft Studio Tips, Tricks, & FAQsNextRounding Decimals

Last updated 5 years ago

Was this helpful?

Instead of “Cells”, you will be using Fields & Variables in JasperSoft.

  • Fields are denoted like this: $F{Field Name}

  • Variables are denoted like this: $V{Variable Name}

In the Expression Editor, simply double-click on the name of a field or variable, and it will automatically create the syntax for you.

Plain Text in Expressions

  • Plain text in expressions should always be surrounded by double quotes (just like formulas in Excel)

Equations

Equations with Numeric Fields

  • Use == for numeric fields

Example

$F{Performance Level} == 4

Equations with Text Fields

  • Use .equals(“ “) for String/Text fields

Example:

${Performance Level Text}.equals(“Proficient”)

Does Not Equal with Numeric Fields

  • Use != for numeric fields

Example:

    $F{Performance Level} != 4

Does Not Equal with Text Fields

  • Use !$F{Field Name}.equals(“ “) for String/Text fields

Example:

!F{Performance Level Text.equals(“Proficient”)

Greater/Less Than or Equal To

  • Use >=

  • Do not use "==" for Greater/Less Than or Equal To

Example:

$F{Percent Correct}>=85

Conditional Expressions (i.e. “If, Then” Statements):

Learning how to write an “If Then” expression in JasperSoft studio is an essential building block for creating all sorts of reports. It is very similar to writing “IF()” formulas in Excel, but the syntax is different.

In Excel...

  • an IF() formula uses the following syntax:

=IF(Condition, Output if True, Output if False)

Example: =IF(B2>A2,"Growth","Decline”)

In JasperSoft Studio...

  • A conditional expression uses the following syntax:

Condition ? Output if True : Output if False

Example 1:

    $F{Percent Correct}>=90
        ? “Mastered”
        : “Not Mastered”

Example 2:

    $F{Performance Level}.equals("Proficient")
        ? $F{Student ID}
        : null

Example 3:

    $F{2015 CELDT Level}>$F{2014 CELDT Level} 
            ? “Growth” 
            : “Decline”
  • Syntax: [Condition] ? [Output if True] : [Output if False]

Nested Conditional Expressions

You can nest conditional expressions to create more complex logic statements.

Example 1:

    $F{Percent Correct}>=90 ? “Exceeding Standard” 
    :$F{Percent Correct}>=80 ? “Meeting Standard” 
    :$F{Percent Correct}>=70 ? “Approaching Standard”
    :$F{Percent Correct}<70 ? “Below Standard”
    :“Not Tested”
  • Note: The conditional expression will stop as soon as a condition is met, only moving on to the next condition if the preceding condition is false.

Example 2:

$F{Grade Level}.equals("1")? 
     ($F{DRABOY}<1?"Benchmark Not Met"
    :$F{DRABOY}<=2?"Benchmark Nearly Met"
    :$F{DRABOY}<=3?"Benchmark Met"
    :$F{DRABOY}>=4?"Benchmark Exceeded" 
    :"Not Tested")
:$F{Grade Level}.equals("2")?
    ($F{DRABOY}<=12?"Benchmark Not Met"
    :$F{DRABOY}<=14?"Benchmark Nearly Met"
    :$F{DRABOY}<=16?"Benchmark Met"
    :$F{DRABOY}>=18?"Benchmark Exceeded"
    :"Not Tested")
:$F{Grade Level}.equals("3")? 
    ($F{DRABOY}<=20?"Benchmark Not Met"
    :$F{DRABOY}<=24?"Benchmark Nearly Met"
    :$F{DRABOY}<=28?"Benchmark Met"
    :$F{DRABOY}>=30?"Benchmark Exceeded" 
    :"Not Tested")
:$F{Grade Level}.equals("4")? 
    ($F{DRABOY}<=30?"Benchmark Not Met"
    :$F{DRABOY}<=34?"Benchmark Nearly Met"
    :$F{DRABOY}<=38?"Benchmark Met"
    :$F{DRABOY}>=40?"Benchmark Exceeded" 
    :"Not Tested")
:$F{Grade Level}.equals("5")? 
    ($F{DRABOY}<38?"Benchmark Not Met"
    :$F{DRABOY}==38?"Benchmark Nearly Met"
    :$F{DRABOY}<=40?"Benchmark Met"
    :$F{DRABOY}>40?"Benchmark Exceeded" 
    :"Not Tested")
:"Not Tested"

“And” / “Or” Logic

  • Use && for “And” logic

Example:

    $F{Grade Level}.equals(“K”) && $F{Scale Score}>=220
  • Use || for “Or” logic

Example:

    $F{Performance Level}.equals(“Meeting Standard”) || $F{Performance Level}.equals(“Exceeding Standard”)
  • The “pipe” character (“ | “) key is located above the return/enter key (hold shift)