InetSoft Reporting Software: Report Sections

A report section is a container of other elements. In most cases, you add script to the individual elements within the Section, rather than to the Section element itself. However, Section scripts also have some special behaviors, which are discussed below.

Accessing Data

When you bind a Section to a data source (i.e., to generate a pseudo-table), each band of the Section is repeated multiple times, corresponding to the number of rows returned by the query. For example, the Content band of the Section is repeated once for each detail record returned by the query.

If you place a script on a component within a repeating band, this script is re-executed for every band repetition. This has the effect of wrapping the script in an implicit “for” loop. Within the script, you can reference the values of elements in the same band:

• value – the value (in current band iteration) of the element to which the script is attached. Use auto-complete to enter the correct syn­tax.

• field['column_name'] or field.column_name – the value (in current band iteration) of the element in the specified field.

You can also refer to an element in the band by its Element ID (e.g., “Text1.text”) to obtain the current value. To obtain the row number corresponding to the current band iteration, use the sectionRow property.

Setting Visual Properties

If you place a script on a component within a repeating band, this script is re-executed for every band repetition. This has the effect of wrapping the script in an implicit “for” loop. You can take advantage of this repetition to compactly and effectively add visual style to the entire Section.

To access the visual properties of current band, use the 'band' object.

In this example, you will modify the Section content band when the query fields meet certain conditions. Follow the steps below:

#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

1. Create a new report, and add a Section element. Bind the Section to the 'Order details' query.

2. Select any Text element in the Content band of the Section. Right-click the element, and select 'Script' from the context menu. This opens the Script Editor for the Text element.

3. Add a script that hides the current band if the value of the 'Price' field is less than 100.

if(field['Price'] < 100) {
   band.visible = false;
 } else {
   band.visible = true;
 } 

4. Add an additional script that colors the band red if the value of the 'Quantity' field is less than or equal to 2.

if(field['Quantity'] <= 2) {
  band.background = [255,0,0];
} else {
  band.background = [255,255,255];
}

More Articles About Reporting

Fund Management Dashboards - Monitoring and assessing performance is crucial for a fund manager. Fund management organizations (hedge funds, pension funds, trust funds, mutual funds, and corporate funds) significantly depend on Key Performance Indicators (KPIs) to gauge performance, spot trends, and make defensible judgments about the assets they are tasked with managing on behalf of customers. The key performance indicators (KPIs) that make up a fund management company's dashboard are examined in this article, giving light on how these measurements guide investment strategies and promote financial success...

Fund Raiser Dashboards - Organizing a fundraiser can be a daunting task in our day and age. It seems that the world economy has not fully recovered from the pandemic and politics don't make the state of things any better. Obviously, all of this means that people are not as likely to give away their money because they might not even have any money to give away. That being said, this doesn't mean that you shouldn't organize a fundraiser if you really need one. You just need to find tools that will help you achieve your fundraising goals, for instance, a dashboard. Here are the ten most important reasons why fundraisers need to use dashboards for their projects...

Volunteer Management Dashboards - For community-driven projects and nonprofit organizations, volunteer management is essential to organizational success. The need for volunteer management software is increasing along with the need for efficient and productive volunteer collaboration. These systems include extensive dashboards with charts and Key Performance Indicators (KPIs) that provide insights into program efficacy, volunteer involvement, and overall operational efficiency. This article will discuss volunteer management software dashboards' key KPIs and charts and how they help volunteer programs succeed...

What Other Features Are There for Exploring Data? - One key aspect of data exploration with visualization software is the ability to create various types of charts and graphs to represent the data visually. Users can choose from a wide range of visualization options, including bar charts, line graphs, pie charts, scatter plots, and more, depending on the nature of the data and the insights they wish to glean. By experimenting with different chart types and configurations, users can identify the most effective visualizations to convey their findings accurately and effectively. Moreover, data visualization software often includes advanced analytical capabilities that enable users to perform complex calculations and statistical analysis directly within the platform. This allows users to gain deeper insights into their data and uncover relationships that may not be immediately apparent. From basic descriptive statistics to more sophisticated techniques such as regression analysis...

 Previous: Creating a Chart Using API Functions