Report Definitions and Data Items
Report Definitions provide a powerful way to customize and control the behavior of reports in the Document Reporting module. This functionality allows users to modify how reports operate without changing the underlying report objects, giving flexibility to adapt reports to specific business needs.
Understanding Report Definitions
A Report Definition is a configuration that controls how a specific report behaves, including which data it processes and how that data is presented. Report Definitions serve as a layer between the report object and its execution, allowing customization without modifying the report's code.
Key components of Report Definitions include:
- Report Definition Code: A unique identifier for the definition
- Report ID: The ID of the report this definition applies to
- Data Items: The data structures the report processes
- Filters: Conditions applied to limit which records are included
- Function Sets: Custom business logic applied during report execution
Working with Report Data Items
Report Data Items are a critical part of Report Definitions. They represent the data structures (tables) that the report will process and the relationships between them. By configuring Report Data Items, you can control which data appears in your reports and how it's organized.
Key Features of Report Data Items
- Enable/Disable Data Items: Include or exclude specific data items from report processing
- Apply Filters: Limit which records are included from each data item
- Function Sets: Apply custom business logic to data items
- Hierarchical Structure: The data items have parent-child relationships between data items that represent the data structure
Setting Up Report Definitions and Data Items
To create a new Report Definition:
- Choose the
icon, enter Report Definitions, and then choose the related link.
- On the Report Definition List page, choose the New action.
- Fill in the following fields:
- Code: Enter a unique code for this report definition.
- Report ID: Select the report this definition applies to.
- Report Caption: Enter a descriptive name that will appear when selecting this definition.
To configure Report Data Items:
- On the Report Definition Card, choose the Data Items action.
- The Report Data Item List page shows all data items from the selected report.
- To modify a data item, select it and choose the Edit action.
- On the Report Data Item Card, you can modify the following fields:
- Enabled: Turn this on or off to include or exclude the data item from report processing.
- Function Set ID: Assign a function set to apply custom business logic to this data item.
- To define filters for the data item, choose the Filters action.
Use Cases for Report Data Item Configuration
Use Case 1: Excluding Sections from a Report
You can simplify reports by disabling data items that aren't relevant to your business scenario:
- On the Report Data Item List page, select the data item you want to exclude.
- Set the Enabled field to No.
- Save your changes.
When the report runs with this definition, the data item and its associated sections will be excluded from the report.
Example: In a booking confirmation report, you might disable the "Revenue lines" data item if you don't want to include the revenues on the confirmation.
Use Case 2: Limiting Data with Filters
Apply filters to report data items to include only relevant records:
- On the Report Data Item List page, select the data item you want to filter.
- Choose the Filters action.
- On the Filters page, add filters to limit which records are included.
- Save your changes.
When the report runs with this definition, only records matching the filters will be included.
Example: In a booking confirmation, you could filter the "Document Lines" data item to include only items with a specific item category.
Use Case 3: Applying Business Logic with Function Sets
Use function sets to apply custom business logic to report data items:
- On the Report Data Item Card, click the lookup button in the Function Set ID field.
- On the Function Set page, define the business logic to apply to the data item.
- Save your changes.
When the report runs with this definition, the function set will be applied to the data item, transforming the data according to your custom logic.
Example: Create a function set that returns the address of a document party.
Use Case 4: Creating Different Views of the Same Report
By creating multiple report definitions for the same report with different data item configurations, you can create different views of the same report:
- Create a new report definition for an existing report.
- Configure the data items differently than in other definitions:
- Enable/disable different data items
- Apply different filters
- Use different function sets
Now you can select which definition to use when running the report, effectively choosing between different views of the same report.
Example: Create one definition of a sales invoice report that groups/combines all services and another that displays all lines, using the same underlying report object.
Advanced Report Data Item Configuration
Hierarchical Data Items
Many reports use a hierarchical structure of data items, where one data item is nested within another. Understanding this hierarchy is important when configuring data items:
- Parent Data Items: Represent the main records (e.g., Sales Header)
- Child Data Items: Represent related records (e.g., Sales Lines)
When you disable a parent data item, all its child data items are automatically excluded regardless of their enabled status.
Function Sets
Function sets provide powerful customization capabilities for report data items:
- On the Report Data Item Card, click the lookup button in the Function Set ID field.
- Depending on the report you can
- Modify field values
- Apply complex filtering logic
- Calculate custom values
- Apply data grouping
Note
Function sets are generated automatically and cannot be created by a user as in other application areas.
Initialization of Data Items
When a report definition is created, the system automatically initializes all data items from the report design. If the report structure changes, you can reinitialize the data items to reflect these changes:
- On the Report Definition Card, choose the Actions menu.
- Select Initialize Data Items.
- The system will update the data item structure to match the current report design.
Note
This functionality depends on whether the report is designed for the Document reporting functionality. Currently, this is mainly supported in the Forwarding module.
Best Practices for Report Data Item Configuration
- Document Your Configurations: Add descriptions and notes to explain why specific data items are enabled or disabled
- Test Thoroughly: Test your report definitions with various data scenarios
- Minimize Filtering Complexity: Keep filters simple and readable
- Use Meaningful Naming: Create clear, descriptive names for report definitions
- Regular Maintenance: Review and update report definitions as business needs change
- Consider Performance: Be mindful of the performance impact of complex filtering or function sets
Integration with Data Grouping
Report Data Item configuration works seamlessly with the Data Grouping functionality described in Document Report Data Grouping:
- Configure your report data items to control which data is included in the report
- Apply data grouping to organize and structure the included data
- The resulting report will display the filtered, transformed data in the structured format you defined
This powerful combination allows for highly customized reports without modifying report objects or layouts.
For more information about working with report layouts, see Managing Report Layouts.