Components of Relational Reporting

At the heart of Relational Reporting is ReportBlox. A set of other Blox (SortBlox, FilterBlox, MembersBlox, OrderBlox, GroupBlox, CalculateBlox, StyleBlox, FormatBlox, SQLDataBlox, DataSourceConnectionBlox, ErrorBlox, and PdfBlox) work with ReportBlox to handle discrete data extraction, manipulation, report formatting, and report rendering functions.

All Relational Reporting Blox are Java™ beans. Each Blox provides a very specific set of functionality as its name suggests. One handles JDBC connectivity to a relational data source; another does nothing but sort the data; and another, nothing but calculation. This clear division of functionality gives you the flexibility to add the appropriate Blox to perform specific tasks only when they are needed. It also gives you better control of the desired outcomes.

To create a relational report with these Blox, you use the provided custom tags in your JSP pages. The order you put these Blox together dictates how these Blox are connected and how the data result set gets transformed. For example, in the following diagram, a calculated member is added based on some calculation, and then some filtering operation is performed. This filtering operation may be based on the values of the calculated member.
This diagram shows the code structure of a JSP using custom JSP tag library. It has an outmost ReportBlox. Nested inside are a CalculateBlox and then a FilterBlox. Each Blox is added using the bloxreport prefix.

The following is a list of all Blox that support creation of relational reports:

Blox
Description
ReportBlox
Generates a report based on the data result set produced by SQLDataBlox. The report can be rendered either in a static HTML table or a table in Dynamic HTML (DHTML) with interactive report editing functionality.
SQLDataBlox
Executes a SQL query against a data source and stores the result in a result set.
DataSourceConnectionBlox
Represents a connection to a relational data source defined to Alphablox.
RDBResultSetDataBlox
Represents an RDBResultSet object derived from a DataBlox.
CalculateBlox
Lets you add a calculated member on the Column dimension based on a specified calculation expression.
SortBlox
Lets you sort the data based on specified members.
FilterBlox
Enables filtering of numeric data based on the criterion you specify.
GroupBlox
Supports grouping of data. By adding a GroupBlox to your ReportBlox, you can create break groups in your report and specify the type of aggregation—sum, average, count, max, min, or none— at the end of each break group.
MembersBlox
Lets you specify members to be included or excluded.
OrderBlox
Lets you specify the order from left to right in which the members are returned to the result set
FormatBlox
Lets you specify the display format for numeric and date data types. It also lets you define the text to display for missing data.
StyleBlox
Lets you set styles such as the fonts, colors, and positions of various elements in the report. You can set style for missing or negative values, and styles for individual columns.
TextBlox
Lets you specify the text to display for group headers, footers, totals, or column headers.
PdfBlox
Lets you send a relational report to PDF with the layout you specify.
PersistenceBlox
Lets you save the state of a report for later retrieval.
ErrorBlox
Catches the exception thrown and prints the details in an HTML table with better handling and display of nested exceptions.