How to Build Student Progress Reports in Your JavaScript Application
Tags: webdev, devops, javascript, tutorial
Published: 2023-07-26 16:05:45

---
canonical_url: https://developer.mescius.com/blogs/how-to-build-student-progress-reports-in-your-javascript-application
description: Learn how to build student progress reports in your JavaScript application. See more from ActiveReportsJS today.
---
The ability to view student progress reports online offers numerous benefits for both parents and educators. Online access provides parents and students with real-time insights into the student’s academic performance, allowing them to stay informed and engaged in their education. They can easily track progress, monitor attendance, view grades, and identify areas where additional support may be needed.

For educators, online progress reports streamline the reporting process, making generating and sharing comprehensive assessments of student performance easier. It enables teachers to communicate more effectively with parents, fostering collaboration and enabling targeted interventions. Overall, online access to student progress reports enhances communication, promotes accountability, and supports a proactive approach to student success.

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/tkupyjrf/progress_report_complete.png?width=387.90406673618344&height=500)

Thankfully, ActiveReportsJS makes it easy for educators to build and customize these progress reports and make it easy to view them in web applications. This article will show you how to use the ActiveReportsJS Report Designer to create a progress report and use the Report Viewer to display your report in a JavaScript application. We’ll be covering the following topics:

*   [Connecting Data to the Report](#connect)
*   [Creating the Progress Report Header and Footer](#create-report)
*   [Displaying Student Information](#display)
*   [Building the GPA Summary and Academic Progress Table](#build)
*   [Creating the Behavioral and Attitude Progress Tablix](#add)
*   [Creating the Attendance Tablix](#add-tablix)
*   [Adding ActiveReportsJS to a JavaScript Application](#add-arjs)

## <a id="connect"></a>Connecting Data to the Report

For the purposes of this article, we’ll be using the standalone designer included in the ActiveReportsJS download. After installing and launching the designer, we’ll be able to see our empty report. Before we get started adding controls to the report, we’ll want to be sure to link up the data we’ll be using to the report.

In the top-right of the designer, select the **Data** panel. This will bring up the display for our **Data Sources**, **Data Sets**, and **Parameters**:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/thlaeszp/data_panel.png?width=429.64352720450285&height=500)

To get started, we’ll need a data source. Click the **Add** button in the Data Sources section to bring up the Data Sources window:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/fgxbxqpj/data_source_window.png?width=500&height=379.4642857142857)

From here, we can tell the report where to look for the data. We have two options regarding where the data can come from: **Remote JSON** or **Embedded JSON**. Remote JSON requires that you provide the URL to an API endpoint, while Embedded JSON allows you to select a JSON file to use to load data directly into the report.

For this report, we will be using Embedded JSON to load several JSON files; we’ve got files for student information, marks, behavior, and attendance, so we will need to create a data source for each of these files. When complete, it should look like this:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/3h5pxv0q/data_sources_complete.png?width=450&height=305)

Now that we’ve set up our four data sources, it’s time to create a data set for each. To create a data set for a data source, simply click the **Plus** icon next to the data source that you want to use; this will bring up the Data Set window:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/mqzcoxzk/data_set_window.png?width=500&height=382.71604938271605)

Since we’re using embedded JSON, all we need to provide is a JSON Path; this tells the report what data we want to retrieve from the JSON. In this case, we want to retrieve all of the JSON, so we use the path **$.***. This tells the report to get all of the data available.

**Note:** If you’re using Remote JSON, you’ll also need to provide a Uri/path value; this value gets passed from the report to the API to tell the API what data to return.

Once the JSON Path is in, hit the **Validate** button to confirm that your data set can retrieve the requested data. If everything works correctly, the **Database Fields** field should now be populated with values from our data:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/y0vht00l/data_set_window_validated.png?width=500&height=379.7327394209354)

Once we set up a data set for each data source, our data panel should look like this:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/fxwbrg02/data_panel_complete.png?width=312.33062330623306&height=500)

And that’s it! Now we’ve got data connected to our report that we can reference in controls. In the next section, we’ll start building out the report's different sections, beginning with the header and footer.

## <a id="create-report"></a>Creating the Progress Report Header and Footer

We can start creating the report elements now that the data has been set up. To start, we will create a header and footer for the pages in our report. In the toolbar, select the **Sections** tab and click the **Add Header** and **Add Footer** buttons:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/jiooc0jg/header_footer_buttons.png?width=500&height=64.18554476806904)

This will add header and footer sections to the report. We want to add two controls from the Control Toolbox in the header section. Click the hamburger button in the top-left of the designer to expand the toolbox, and then drag a **TextBox** and an **Image** control into the page header.

Inside the TextBox, we will set its value to “Student Progress Report”. Then, we will embed an image into the report for the Image control. Select the Image control, and then expand the Image dropdown in the Appearance section of its properties. To embed an image, click the **Embedded** button and then click **Load…**to open up the file explorer and select the image that you want to load:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/skcpqzbb/load_embedded.png?width=500&height=452.1988527724665)

Now that our image is loaded and our text is set, we’re just going to do a bit of resizing and styling through the Properties panel. When complete, our header section looks like so:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/1wrimuaq/page_header_complete.png?width=500&height=80.50847457627118)

Now it's time to create the footer. In our footer, we will want to include 3 TextBoxes: two with contact information and one to display the current year. Next to each box containing contact information, we also want to include an icon of a phone to signify that these are phone numbers.

Drag three TextBox controls and two Image controls into the footer area of the page. We will follow the same steps outlined above for setting the images. For two of the TextBox controls, we’re just going to be putting in some phone numbers that can be used to contact the report owner, but for the third, we will use an expression so that it will always display the current year.

Inside of this third TextBox, place this value: **© {Year(Now())} GrapeCity, Inc. All Rights Reserved.** You can see inside the string that we’ve included braces, and inside the braces, the expression **Year(Now())**; this will return the current year, and the report knows to evaluate this as an expression because we’ve placed it within braces.

After doing a little bit of styling, the footer should look like this:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/sd1hf3c3/page_footer_complete.png?width=500&height=60.862214708368555)

We can preview the report to see how the expression that we’ve created evaluates:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/qgbnbzxf/page_footer_preview.png?width=500&height=54.75382003395586)

Now that we’ve created the header and footer, they’ll be displayed on each report page. In the next section, we’ll add some of the data we’ve loaded by displaying some basic information about the student.

## <a id="display"></a>Displaying Student Information

Now it’s time to start incorporating some of the data the report is loading. First, drag a TextBox and a Container control onto the report body. Expand both so that they extend most of the page’s width, and inside of the TextBox control, include the text “Student Information”:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/5tpl0eui/student_info_base.png?width=500&height=161.4173228346457)

We’ll be using this Container to hold all the information associated with the student.

Now, we will place TextBoxes inside the Container; these will be used for both labels and to hold information from the data sets.

Set the container up to match the following:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/jvddvvhl/student_info_setup.png?width=500&height=161.4173228346457)

Now, inside each of the empty TextBoxes, we’ll want to include expressions that retrieve data from our student information data set. Include the following text in the associated TextBoxes:

<div class="pm-table-container with-shadow-observer" data-layout="default">

<div class="pm-table-wrapper">

<table border="0" data-number-column="false">

<tbody>

<tr>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="122" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

Label

</div>

</th>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="168" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

 TextBox Value

</div>

</th>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Enrollment ID :

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{EnrollmentID}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Enrollment Date:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{DateTime.Now().AddYears(-8)}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Student Name:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{StudentName}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Grade:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{Grade}th

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Year:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{Year(now()) - 1} - {Year(DateTime.Now())}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Date Of Birth:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(Month(DateTime.Now()) < 7, DateTime.Now().AddYears(-13).AddMonths(2), DateTime.Now().AddYears(-13).AddMonths(-3))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Father's Name:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{FatherName}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Mother's Name:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{MotherName}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Phone Number:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{PhoneNumber}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Address:

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{Address}

</td>

</tr>

</tbody>

</table>

</div>

</div>

When complete, you should be able to preview the report and see the following:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/5xjiufy3/student_info_complete.png?width=500&height=155.39215686274508)

## <a id="build"></a>Building the GPA Summary and Academic Progress Table

Next, we will display information relating to the student’s grades.

First, we will create the GPA Summary section; like in the previous section, drag a TextBox and Container control onto the report. Expand both so that they extend most of the page’s width, and inside of the TextBox control, include the text “GPA Summary”:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/5ccpqac3/gpa_summary_base.png?width=500&height=84.40959409594096)

Inside of this Container, we want to display the overall GPA of the student, as well as their percentile. Drag four TextBoxes into the container, setting them up as such:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/2sqlclx0/gpa_summary_setup.png?width=500&height=80.93023255813954)

Next, we’re going to need to set up some more expressions inside of the empty TextBoxes:

<div class="pm-table-container with-shadow-observer" data-layout="default">

<div class="pm-table-wrapper">

<table border="0" data-number-column="false">

<tbody>

<tr>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="122" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

Label

</div>

</th>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="168" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

 TextBox Value

</div>

</th>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Overall GPA

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(Round((Avg(MarksT1, "mark") + Avg(MarksT2, "mark") + Avg(MarksT3, "mark")) / 3, 2) > 90, 4, IIF(Round((Avg(MarksT1, "mark") + Avg(MarksT2, "mark") + Avg(MarksT3, "mark")) / 3, 2) > 80, 3, IIF(Round((Avg(MarksT1, "mark") + Avg(MarksT2, "mark") + Avg(MarksT3, "mark")) / 3, 2) > 70, 2, IIF(Round((Avg(MarksT1, "mark") + Avg(MarksT2, "mark") + Avg(MarksT3, "mark")) / 3, 2) > 60, 1, 0))))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Percentile

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{Round((Avg(MarksT1, "mark") + Avg(MarksT2, "mark") + Avg(MarksT3, "mark")) / 3, 2) / 100}

</td>

</tr>

</tbody>

</table>

</div>

</div>

The Overall GPA expression will calculate the percentile they fall into and then, based on that, will provide an associated numeric GPA value. The Percentile expression simply calculates their grade based on a percentage.

When completed, you should be able to see the following when previewing the report:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/ugwllv30/gpa_summary_preview.png?width=500&height=71.16104868913857)

Now that we’ve created the summary, it’s time to show a breakdown of the student’s progress by subject. Beneath the GPA Summary section, drag a TextBox and a Table control onto the report body. Inside the TextBox, include the text “Academic Progress”, while inside the table, including the following column headers:

*   Subject
*   Teacher
*   Trimester 1
*   Trimester 2
*   Trimester 3

When completed, it should look something like this:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/f5glksl2/academic_progress_base.png?width=500&height=105.38532961931291)

The next thing that we need to do is associate the correct data set with the table. Select the Table control, and then inside the Properties panel, set the Data Set Name dropdown to use the **mark** data set. Now we can reference data from this data set within the table.

Fill out the rest of the table as such:

<div class="pm-table-container with-shadow-observer" data-layout="default">

<div class="pm-table-wrapper">

<table border="0" data-number-column="false">

<tbody>

<tr>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="122" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

Cell

</div>

</th>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="168" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

 Value

</div>

</th>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Detail Row Cell 1

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{Subject}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Detail Row Cell 2

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{SubjectTeacher}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Detail Row Cell 3

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(MarksT1 >= 90, "A", IIF(MarksT1 >= 80, "B", IIF(MarksT1 >= 70, "C", IIF(MarksT1 >= 60, "D", "E/F"))))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Detail Row Cell 4

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(MarksT2 >= 90, "A", IIF(MarksT2 >= 80, "B", IIF(MarksT2 >= 70, "C", IIF(MarksT2 >= 60, "D", "E/F"))))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Detail Row Cell 5

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(MarksT3 >= 90, "A", IIF(MarksT3 >= 80, "B", IIF(MarksT3 >= 70, "C", IIF(MarksT3 >= 60, "D", "E/F"))))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Footer Row Cell 1

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

 

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Footer Row Cell 2

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

Cumulative GPA:

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Footer Row Cell 3

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(Avg(Convert.ToInt32(MarksT1)) > 90, 4, IIF(Avg(Convert.ToInt32(MarksT1)) > 80, 3, IIF(Avg(Convert.ToInt32(MarksT1)) > 70, 2, IIF(Avg(Convert.ToInt32(MarksT1)) > 60, 1, 0))))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Footer Row Cell 4

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(Avg(Convert.ToInt32(MarksT2)) > 90, 4, IIF(Avg(Convert.ToInt32(MarksT2)) > 80, 3, IIF(Avg(Convert.ToInt32(MarksT2)) > 70, 2, IIF(Avg(Convert.ToInt32(MarksT2)) > 60, 1, 0))))}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Footer Row Cell 5

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

{IIF(Avg(Convert.ToInt32(MarksT3)) > 90, 4, IIF(Avg(Convert.ToInt32(MarksT3)) > 80, 3, IIF(Avg(Convert.ToInt32(MarksT3)) > 70, 2, IIF(Avg(Convert.ToInt32(MarksT3)) > 60, 1, 0))))}

</td>

</tr>

</tbody>

</table>

</div>

</div>

After a little additional styling, the Table control now looks as such:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/y0hlg022/academic_progress_table_complete.png?width=500&height=81.3953488372093)

When we preview our report, the table should look like so:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/uqhb4fgu/academic_progress_table_preview.png?width=500&height=292.62672811059906)

## <a id="add"></a>Adding the Behavioral and Attitude Progress Tablix

Now that users can view their academic progress, it’s time for us to add a section showing the teacher’s marks on the behavioral and attitude progress of the student. Before we do this, we will add a new section to our report. At the bottom of the report designer, you will see an **Add Section** button; press this, and it will add a new Page/Continuous Section to your report:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/q0udckrc/new_section.png?width=500&height=27.0473328324568)

Now, beneath the header of this new section, add a TextBox control, a Container control, and three TextBox controls inside of the Container control:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/cwnn3dun/behavior_attitude_base.png?width=500&height=147.52567693744166)

As you can see, we’ve filled out these TextBoxes with our own text. Before we add the Tablix controls, we want to make one more modification.

In these tables, we want to use icons to display where the student falls in terms of **Excellent**, **Satisfactory**, and **Need Improvement**. We’re going to use green, yellow, and red icons. To add these, add the following values to the **Image** property of the associated TextBox:

<div class="pm-table-container with-shadow-observer" data-layout="default">

<div class="pm-table-wrapper">

<table border="0" data-number-column="false">

<tbody>

<tr>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="122" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

TextBox

</div>

</th>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="168" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

 Value

</div>

</th>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Excellent

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

**Source**: Database
**Value**: {IconSet("TrafficLights", true, false, false, false, false)}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Satisfactory

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

**Source**: Database
**Value**: {IconSet("TrafficLights", false, true, false, false, false)}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

Need Improvement

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

**Source**: Database
**Value**: {IconSet("TrafficLights", false, false, true, false, false)}

</td>

</tr>

</tbody>

</table>

</div>

</div>

Now if we preview the report, we should see the following:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/dosm3qpj/behavior_attitude_icon.png?width=500&height=51.94805194805195)

Now that the Tablix container is set up, it’s time to add the Tablix controls to display the behavioral and attitude progress data. Drag a Tablix control into this container; you’ll see the Tablix Wizard pop up in the designer window:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/xgclcnnk/tablix_wizard_base.png?width=500&height=348.3271375464684)

The Tablix Wizard is an extremely powerful tool for creating a Tablix (or pivot table as it is also known) control, which can display data in more dynamic ways than a standard table.

We’re going to be using data from the **behavior** data set that we created at the beginning of the article. Expand this data set, and then drag and drop the **BehavioralMeasure** value to the **Row Groups** section of the wizard, and drag and drop the **T1**, **T2**, and **T3** values to the **Values** section of the wizard. Be sure to change the aggregate values for T1, T2, and T3 from **Count** to **None**.

Before finishing up, click on the **Filters** button in the wizard; we need to set up a filter for this table. Here, click the **Add** button to add a new filter. Set the first box to the **Type** field of the dataset, and set the filter to look for the string “Work Habit”:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/442or2g5/tablix_first_filter.png?width=500&height=116.86879823594268)

When complete, you can hit the **OK** button and see what your Tablix looks like at this point:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/c4uddxp3/tablix_first_no_style.png?width=500&height=51.819184123484014)

Now, like with the **Excellent** **Satisfactory** and **Need Improvement** TextBoxes, we’re going to update the data cells for the T1, T2, and T3 columns to display the icons instead of text values. For each of these data cells, remove the text value and update the **Image** property of the associated TextBox:

<div class="pm-table-container with-shadow-observer" data-layout="default">

<div class="pm-table-wrapper">

<table border="0" data-number-column="false">

<tbody>

<tr>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="122" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

Cell

</div>

</th>

<th class="ak-renderer-tableHeader-sortable-column__wrapper" colspan="1" rowspan="1" data-colwidth="168" aria-sort="none">

<div class="ak-renderer-tableHeader-sortable-column">

 Value

</div>

</th>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

T1

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

**Source**: Database
**Value**: {IconSet("TrafficLights", IIF(T1 = "E", true, false), IIF(T1 = "M", true, false), IIF(T1 = "N", true, false), false, false)}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

T2

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

**Source**: Database
**Value**: {IconSet("TrafficLights", IIF(T2 = "E", true, false), IIF(T2 = "M", true, false), IIF(T2 = "N", true, false), false, false)}

</td>

</tr>

<tr>

<td colspan="1" rowspan="1" data-colwidth="122">

T3

</td>

<td colspan="1" rowspan="1" data-colwidth="168">

**Source**: Database
**Value**: {IconSet("TrafficLights", IIF(T3 = "E", true, false), IIF(T3 = "M", true, false), IIF(T3 = "N", true, false), false, false)}

</td>

</tr>

</tbody>

</table>

</div>

</div>

This will make it so that the Tablix control will place the correct traffic light icon in the cell based on the cell value. After some style updates, our first Tablix should look like so:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/wipiqfqa/tablix_first_complete.png?width=500&height=49.76744186046511)

When we preview the report, the Tablix should look as such:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/zh4k1u4z/tablix_first_preview.png?width=500&height=219.9383350462487)

Now, we need to create the second Tablix control to display attitude information. The good thing is that this Tablix is almost identical to the one we just created. Copy and paste the first Tablix that we created, and then place this in the container just beneath the other Tablix. Then, update the first header cell from “Work Habits” to “Adherence to Code of Conduct”.

Finally, select the second Tablix control and click the gear icon in the top-right of the control; this will re-open the Tablix wizard. Click the **Filters** button; we’re going to modify the filter that we’re currently using.

Update the filter text value from “Work Habits” to “Classroom Conduct”. Now, the Behavioral and Attitude Progress section should look like so:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/l35nulng/behavior_attitude_complete.png?width=500&height=145.19140989729226)

When we preview the report, the Behavioral and Attitude Progress section should look as follows:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/odgmsspf/behavior_attitude_preview.png?width=500&height=423.9130434782609)

## <a id="add-tablix"></a>Adding the Attendance Tablix

The final section that we’re going to add to our report will show the student’s attendance. Drag a TextBox control and a Tablix control onto the report, and place them beneath the Behavioral and Attitude Progress section.

Inside the Tablix wizard, we’re going to be using the **attendance** data set; drag the **Days** value into the **Row Groups** section of the wizard, and drag the **T1**, **T2**, and **T3** values into the **Values** section of the wizard. Also, be sure to set the aggregate values for **T1**, **T2**, and **T3** to **Sum**:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/fz1d1rv0/attendance_tablix_wizard.png?width=500&height=347.3566641846612)

Now, the Attendance section should look as such:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/3gaf5jzu/attendance_tablix_complete.png?width=500&height=71.89542483660131)

And when we preview the report, it should look as follows:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/krvnvpsi/attendance_tablix_preview.png?width=500&height=113.87163561076605)

Now, with the report complete, when we preview the report the pages should look like so:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/tkupyjrf/progress_report_complete.png?width=387.90406673618344&height=500)

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/3kmlj54q/progress_report_complete_page_two.png?width=389.2371995820272&height=500)

## <a id="add-arjs"></a>Adding ActiveReportsJS to a JavaScript Application

Now that we’ve got our student progress report created, it’s time to add the ActiveReportsJS Report Viewer to a JavaScript application so that we can view the report in the browser. Create a new file called **index.html**, and open this file in your IDE of choice. We’re going to add the following code to the file:

```
    <!DOCTYPE html>

    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <title>Student Progress Report</title>
        <meta name="description" content="ARJS Report viewer" />
        <meta name="author" content="GrapeCity" />
      </head>
      <body></body>
    </html>
```

Now that the HTML file is set up, it’s time to add ActiveReportsJS to the file. For this, we’re going to use the CDN to load the required files. Inside the **<head>** tag, add the following code:

```
    <link rel="stylesheet" href="https://cdn.grapecity.com/activereportsjs/4.latest/styles/ar-js-ui.css" type="text/css" />
    <link rel="stylesheet" href="https://cdn.grapecity.com/activereportsjs/4.latest/styles/ar-js-viewer.css" type="text/css" />
    <script src="https://cdn.grapecity.com/activereportsjs/4.latest/dist/ar-js-core.js"></script>
    <script src="https://cdn.grapecity.com/activereportsjs/4.latest/dist/ar-js-viewer.js"></script>
    <script src="https://cdn.grapecity.com/activereportsjs/4.latest/dist/ar-js-pdf.js"></script>
    <script src="https://cdn.grapecity.com/activereportsjs/4.latest/dist/ar-js-tabular-data.js"></script>
    <script src="https://cdn.grapecity.com/activereportsjs/4.latest/dist/ar-js-html.js"></script>
```

The first two lines of code load the required CSS files: the core CSS file and the viewer CSS file. Then, we’re loading in the core JavaScript file and the viewer JavaScript file. Finally, we’re loading a pdf, tabular data, and HTML JavaScript file; these files give users the ability to export the report in the respective file types.

If you do not want to allow users to export the report in a specific format, all you need to do is exclude the associated **<script>** tag, and users will be unable to export in that file type.

Next, we’re going to add some basic styles to the elements on the page. Inside the **<head>** tag, beneath the script tags we just added, add the following code:

```
    <style>
        body {
            margin: 0;
        }
        #viewer-host {
          width: 100%;
          height: 100vh;
        }
    </style>
```

This will remove the margins from the body element, and will also set the width and height of the element with the ID of **viewer-host**.

Now, inside of the **<body>** tag, add the following element:

```
    <div id="viewer-host"></div>
```

We’ve given this div the ID of **viewer-host**; this will mean that it will receive the CSS styles that we set previously, but it also will allow us to tie the JavaScript Report Viewer to the div.

Finally, beneath the div, add the following code:

```
    <script>
        var viewer = new ActiveReports.Viewer("#viewer-host");
        viewer.open("StudentProgressReport.rdlx-json");
    </script>
```

This JavaScript will create a new ActiveReportsJS Viewer, associating it with the element with the ID **viewer-host**. Then, we call the open method of the viewer and pass in our report name.

The last thing that you need to be sure of is that you place the report in the same folder as your index.html file; if you don’t, be sure to point to the correct location of your report.

The only thing left is to run the application. You can use any [static web-server](https://gist.github.com/willurd/5720255) to run the application; since we use Visual Studio Code, we use the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension to quickly spin up a static web-server. When you open the application in your browser, you should see the following:

![JavaScript Progress Report](https://files.grapecity.com/gc-website-media/kedgbnys/report_viewer_final.png?width=500&height=252.8825995807128)

## Conclusion

And that’s all there is to it! As you can see, ActiveReportsJS makes it easy to build customized progress reports, allowing teachers and students alike to track the student’s progress throughout the school year.

Happy coding!