InetSoft Reporting Software: Report Bean Example


This report bean example (bean.srt in the examples/docExamples/script directory) is based on the table example. It changes two parts of the report into report beans:

Note: Set your Registry location to examples/docExamples/script. See Registry Configuration in Report Designer for instructions.

  • The report header section is converted into a bean, and the script for calculating the date range is contained in the bean. This allows the bean to be reused across multiple reports without re-implementing the script.
  • The table label and field are changed to a bean. The bean is used to create a total over 1,000 and a total under 1,000.
View the Gallery Register

Figure 3. Report Bean Example

Report Bean Example

Report Header Bean

Making a report bean from the report header does not require any redesign. Simply copy and paste the appropriate elements into a report bean and define the appropriate properties.

  1. Copy and paste the title elements into a report bean.
  2. Select Edit → Bean Definition, add the text property of the subtitle element to the right frame and enter 'subtitle' for the property name.
  3. Add the text property of the section title element to the right frame and enter 'section title' for the property name.

The script on the date field remains the same:

var now = new Date();

switch(now.getMonth()) {
case 0: case 1: case 2:
   text = "1sr Qtr";
   break;
case 3: case 4: case 5:
   text = "2nd Qtr";
   break;
case 6: case 7: case 8:
   text = "3rd Qtr";
   break;
case 9: case 10: case 11:
   text = "4th Qtr";
   break;
}

text = text + ", " + formatDate(now, 'yyyy');

Since the script uses the property of the text element it is attached to, the references are automatically resolved to the current element. To use the bean, simple replace the elements in the report with the bean.

Total Field Bean

The elements for displaying the two totals are almost identical. We will replace these elements with a report bean following a similar procedure:

  1. Copy and paste the total label and textbox fields into a report bean.
  2. Add the label and total field text property to the bean properties on the Bean Property Definition dialog.
  3. Replace the total fields with two 'total field' beans.
  4. Change the table script to assign the calculation results to the bean.
var total1 = 0, total2 = 0;
 
for(var i = 1; i < table.length; i++) {
   var price = table[i]['Total'];

   if(price > 1000) {
      for(var c = 0; c < table[i].length; c++) {
         cellBackground[i][c] = 0xBBFFBB;
      }
      total1 += price;
   }
   else {
      total2 += price;
   }
}
 
totalOver.value = formatNumber(total1, '$#,###.00');
totalBelow.value = formatNumber(total2, '$#,###.00');

A report bean can be a complete component with presentation elements, properties and dynamic behaviors. We will provide additional examples of how to use report beans to encapsulate complete components.

More Articles About Reporting

Claims Processing Key Metrics - Claim Cycle Time: This indicator gauges the typical processing time from claim filing to settlement. This KPI is monitored by insurance operations analysts to spot bottlenecks and speed up the claims process. Claims Settlement Ratio: Based on the total number of claims received, this KPI determines the proportion of claims that were successfully resolved. It aids analysts in assessing the efficacy of claims management procedures. Average Claim Cost: Analysts may see trends and patterns that may affect the company's profitability by looking at the average cost of claims. For monitoring claim reserves and pricing rules, this KPI is important...

Days Sales Outstanding (DSO) - To put it another way, DSO counts the typical number of days it takes a business to be paid for a transaction. Faster payment collection is indicated by a reduced DSO, which is usually good news for a business. Organizations are able to evaluate the effectiveness of their credit and collections procedures by monitoring DSO on the integrated receivables dashboard...

Flexible Ad Hoc Dashboards - The built-in interactive customization of InetSoft's visualization dashboards offers the first level of ad hoc reporting. Furthermore, analysts and power users can easily create new dashboards through a drag-and-drop web app. These users can be further empowered with data mashup ability to dynamically introduce new data for ad hoc reporting...

Payment Processing Time - The length of time it takes to execute a payment transaction from start to finish is called the payment processing time. This KPI is essential for determining delays or inefficiencies in the payment process, gauging how effective payment systems are, and streamlining the payment process. Payment operations analysts may enhance customer satisfaction, optimize processes, and lower the possibility of late payments or missed deadlines by assessing processing times...

Trading Operational Efficiency - Investment operations analysts depend on the KPIs and data listed below to ensure operational efficiency: Trade Settlement Cycle: The duration needed to complete and settle deals is measured by the trade settlement cycle. To ensure fast settlement and lower operational risks, analysts track this KPI to spot any delays or bottlenecks in the settlement process. Trade Errors: Trade mistakes may have a big financial impact. For the purpose of determining the reasons, putting preventative measures in place, and boosting operational effectiveness, analysts keep track of the quantity and kinds of trade mistakes, such as inaccurate order inputs or unsuccessful deals. Straight-Through Processing (STP) Rate: STP rate is a measurement of the proportion of transactions that can be handled entirely online. High STP rates are the goal of investment operations analysts since they lower the risk of mistakes, increase efficiency, and simplify operational processes...

What Types of Transaction Reporting Are There? - Transaction reporting encompasses various types of reports that document and provide insights into different aspects of financial transactions. These reports serve regulatory, operational, and analytical purposes for businesses, financial institutions, and regulatory authorities. Here are some common types of transaction reporting: Trade Confirmation Reports: These reports confirm the details of a financial trade or transaction between counterparties. They typically include information such as the trade date, transaction type, quantity, price, currency, and settlement terms. Trade confirmation reports are essential for ensuring accuracy and transparency in trading activities...

Previous: Reusable Report Logic - Report Beans