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
  • Step 8 - Grade Level Sorting (*If Necessary)
  • Scenarios
  • Scenario 1 - Numeric Grade Levels Only
  • Scenario 2 - Data Contains Non-numeric Grade Levels

Was this helpful?

  1. Tutorials
  2. Tutorials for Pro Version ("Professional Edition")
  3. Tutorial 2: Using Report Bands

Step 8 - Grade Level Sorting

Tutorial 2 for Pro Version: Using Report Bands

Step 8 - Grade Level Sorting (*If Necessary)

The grade levels in your chart may be sorted incorrectly.

For example, you may notice that Grades "10, "11", or "12" are not in the right order. Or, you may notice that Grades "K", "TK", "PreK", etc. are showing last.

This is happening because the Grade Level field is a "String" (aka "text") field, and the chart is sorting the grade levels alphabetically.

There are two scenarios, which will call for different solutions:

Scenarios

  1. Your data includes only numeric grade levels (i.e. Grades 1-12, but NOT Grades K, TK, etc.)

  2. Your data includes non-numeric grade levels (i.e. Grades K, TK, etc.)

Scenario 1 - Numeric Grade Levels Only

If your dataset includes only numeric grade levels, you can simply tell Jaspersoft to treat your Grade Level field as if it were an Integer, and it will sort your grade levels correctly.

  • Navigate to your Outline tab

  • Select the Current Grade Level field under the "Fields" section in your outline.

  • Go to the Properties tab

  • Change the Class to java.lang.Integer

Preview your report. Your grade levels should now be sorting correctly.

WARNING: If, at any point, the dataset includes a grade level that is not numeric, the report will throw an error and will not run.

Only use this method if you are absolutely sure the dataset for this report will never include non-numeric grade levels.

Scenario 2 - Data Contains Non-numeric Grade Levels

If your dataset includes non-numeric grade levels, you'll need to create a variable that transforms your grade levels into pure numeric values.

Create "Grade Level Numeric" Variable

  • Navigate to your Outline tab

  • Right-click on the Variables section in your outline

  • Select Create Variable

  • Select the newly created Variable_1 variable in the outline

  • Rename the variable to: "Grade Level Numeric"

  • Set the Value Class Name to java.lang.Integer

  • Click the pencil icon to the right of the expression field to bring up the expression editor.

Translate Grade Levels to Numeric Values

TIP: Know your data! To use the BI Tool effectively, you need to know your data. Look at the data in your custom report. Grade Levels are unique to your instance of Illuminate. Do you have "Pre-K"? "TK"? etc. You may need to adjust the expression below to account for the grade levels you have in your Illuminate site.

In the expression editor,

  • Write the following Expression:

    • You may need to customize the expression to account for the unique grade levels that you have in your Illuminate site.

$F{Current Grade Level}.equals("TK")
    ? -1
:$F{Current Grade Level}.equals("K")
    ? 0
:INTEGER_VALUE($F{Current Grade Level})

What is this expression doing?

If the current grade level is "TK", then output -1. If the current grade level is "K", then output 0. Otherwise, output the integer value of the current grade level.

Create a Sort Field

Now, we need to sort our data using this "Grade Level Numeric" variable that we just created.

  • Navigate to the Outline tab

  • Right-click on Sort Fields

  • Select Create Sort Field

  • Select Grade Level Numeric

  • Click Finish

Remove Sorting (a.k.a "Order") Default from Chart

Finally, we need to remove the sorting from the chart. By default, HTML5 Charts will re-sort your data, based on your Category Level. In this case however, we are pre-sorting the data using the "Grade Level Numeric" variable, so we need to tell the chart not to re-sort our data.

Double-click on the chart

  • Click Chart Data > Configuration

  • Double-click on the "Grade Level" category level (or click Modify)

  • Change the Order field from "Ascending" to "None"

  • Click Finish

Preview your report. The grade levels should now be sorting correctly.

PreviousStep 7 - Add Site Name FieldNextCrossTabs Tutorial - Create, Format, and Style a CrossTab

Last updated 5 years ago

Was this helpful?

Refer to for detailed documentation on writing expressions in JSS.

Did you know Illuminate can build your BI Tool for you?

Basics of Writing Expressions in JSS
Click here to learn about Illuminate's Report Building Service.