BladeFX Documentation

Report Code

๐Ÿ“ Location in Application:

Reports โ†’ Open report โ†’ Report Code

๐Ÿง  Purpose of Report Code

The Report Code tab is used to define all data logic of the report.

Important design rule:
All grouping, sorting, filtering, limits, and calculations must be defined here.
The Report Designer does not change data logic โ€“ it only controls visual layout.

๐Ÿ“Š What Are Tables in Report Code?

Visit section Tables to learn more about tables in report code.

๐Ÿง  Purpose of Report Code

The Report Code tab is used to define all data logic of the report.

Important design rule:
All grouping, sorting, filtering, limits, and calculations must be defined here.
The Report Designer does not change data logic โ€“ it only controls visual layou

๐Ÿ†• 1. Creating a New Report Table

Each report can consist of one or more tables.

To add a new table:

  1. Open the Report Code tab.
  2. Click the โž• Add new table option.
  3. A new table (e.g. New table 1) will be created.
  4. The query editor will become active for this table.

Each table represents one result set rendered in the report.

โš™๏ธ 2. Table Properties

Each table has its own configuration.

Available fields

  • Name*
  • Logical name of the table (shown in designer and internal references).
  • Sort position*
  • Defines the order in which tables are processed and displayed.
  • Connection*
  • Connection used to execute the query / API.
  • Check column list
  • Optional validation list to ensure expected columns exist in result set.

Table options

  • โ˜‘ Is active
  • Enables or disables the table.
  • โ˜‘ Can be empty
  • Allows the table to return zero rows without causing an error.
  • โ›” Connection locked
  • Forces the table to always use the selected connection.
  • โš™๏ธ SetRepParams
  • Enables parameter binding between report parameters and query execution.

๐Ÿงพ3. Writing Report Code

The Report Code editor is where all business logic and data retrieval logic is defined.

Depending on the selected table data source, the code can be:

  • SQL (for relational databases)
  • ODBC-based queries (for non-SQL or proprietary systems)
  • API request definitions (for external services)

You can define:

  • Data retrieval logic
  • Query or request definition used to fetch data from the source
  • Joins between data entities
  • Using SQL joins, ODBC-supported joins, or structured API responses
  • Aggregations
  • Calculations such as totals, counts, averages, and derived metrics
  • (e.g. , , , or source-specific equivalents)
  • Grouping
  • Logical grouping of data at source level
  • (e.g. or API-side grouping mechanisms)
  • Sorting
  • Definition of result ordering
  • (e.g. or source-specific sorting rules)
  • Filtering
  • Restricting datasets using conditions
  • (e.g. , filters, or API parameters)
  • Result size control
  • Limiting returned data
  • (e.g. , pagination, or API limits)
  • Advanced logic
  • Complex data shaping such as unions, subqueries, derived datasets, or multi-step API calls

Example use cases:

  • Top N entities (products, customers, orders)
  • Sales or performance summaries
  • Aggregated KPIs and metrics
  • Drilldown-compatible datasets
  • Combined datasets from multiple systems

Important rule

All data logic belongs in Report Code, regardless of data source.
The Report Designer is pixel-perfect only and does not modify logic, grouping, or calculations.

๐Ÿงฉ 4. Multiple Tables per Report

A single report can contain multiple tables, for example:

  • Main dataset
  • Totals / summary row
  • Auxiliary lookup table

Tables are:

  • Executed independently
  • Ordered by Sort position
  • Available individually in the Report Designer

๐Ÿ› ๏ธ 5. Toolbar Actions

The Report Code editor provides several tools:

  • ๐Ÿ’พ Save โ€“ saves current report code
  • โ–ถ Execute / Test โ€“ runs the SQL query
  • ๐Ÿ” Search โ€“ find text in SQL editor
  • โ›ถ Fullscreen โ€“ expand editor to full screen
  • โ— Info โ€“ show available editor commands
  • โœ Edit / Parameters test โ€“ test parameter values

โœ… Summary

  • Report Code = logic layer
  • Report Designer = pixel-perfect layout
  • SQL defines what data is returned
  • Designer defines how data is shown