How to make Drill-Down report in Delphi/Lazarus/С++ Builder

FastReport VCL is a VCL library for Delphi, C++ Builder, RAD Studio and Lazarus report and document creation. It provides a visual template designer that can access the most popular data sources, report engines, previews, export filters to more than 30 formats, and can be deployed to the cloud, web, email, and print.

Recently, FastReport VCL has been updated to v6.9. In the new version, interactive form support for the following objects has been added to the PDF export: text, checkboxes and pictures. It is possible to include only the required glyphs in the interactive form through the InteractiveFormsFontSubset property. Fixed multiple bug issues at the same time. Welcome to download and experience. (Click the button below to download)

Click now to download the latest version of FastReport VCL v6.9

"Drill down" or "deep data" is a concept with many aspects, which can refer to operations in tables or other contents that encapsulate information. Simple and clear, this is a drop-down list!

One of the most important operations is to drill down, for example, in OLAP with cubes, and in principle in many places. After all, it greatly simplifies information analysis. "Carefully study" the data layer. Let's "take a closer look at the data"! Usually, this is done by clicking on the data we want to drill down.

You can create a drop-down list in FastReport VCL, which is the feature we will discuss in this article.

About the drill-down properties and their connections in FastReport VCL:

The group header itself has the DrillDown property (the "DrillDown" item on the menu). After enabling "drill down", you can make the group interactive.

In simple terms, the group will start responding to mouse clicks in the preview window. Clicking on the title will allow you to expand (show all content) or collapse (hide content), leaving only the title and (if needed) the basement or subband. You can use the ShowFooterIfDrillDown and ShowChildIfDrillDown properties to configure.

Insert picture description here

The screenshot below shows an example of a group with a single expanded title:

FastReport VCL

You can specify whether to collapse or expand all groups when running the report. By default, these groups are collapsed, which is controlled by the ExpandDrillDown property. If you want to expand the group, set this property to True.

The preview also has the function of opening and closing group information from the context menu.
FastReport VCL

It should be noted that when using the DrillDown mechanism, the report will be rebuilt every time. If the report is based on "large" query data, such a query will be run every time DrillDown is triggered. In this case, you want to save the results of the query execution in a temporary table. In addition, the generated report saved in fp3 format and then loaded into the preview window or FR Viewer will not work.

In the code, TfrxGroupHeader property retrospective reports used to create the following:
var GH: TfrxGroupHeader;
GH: = TfrxGroupHeader (frxReport1.FindObject ( 'GroupHeader1'));
gh.DrillDown: = True;
gh.ExpandDrillDown: = True;
GH .ShowChildIfDrillDown := False;
gh.ShowFooterIfDrillDown := True;
I find reports that use the DrillDown type and its attributes useful and easy to use. I am not the only one! Any office worker will thank you for diluting their desperate lives through this interaction! The only thing is, don't quit and try to "stomp" into a report with multiple levels! It is expected that this will reduce documentation and workload.
Want more? You can click to read [ FastReport Report 2020 Latest Resource Inventory ] to find the tutorial resources you need.

Guess you like

Origin blog.csdn.net/RoffeyYang/article/details/113861754