New Features of the FastReport VCL Editor

2024-11-01

Our products are constantly evolving, with new features being continuously added and the quality of the code improved. In this article, we will explore new capabilities of the report editor that are not covered in the user manual.


Object Inspector

You now have the option to add individual properties to "Favorites." To do this, focus the cursor on the object inspector and press the CTRL key. Checkboxes will appear next to the property names; select the properties you need and add them to your favorites list. You can remove properties in the same way from the "Favorites" tab. Events cannot be added to favorites.

A search input box has been added next to the object inspector tabs for quick property searching. The search window may not be visible if the object inspector is narrow. When you enter data into this box, the inspector will begin displaying only those properties that contain the entered string.

Search and Highlight Favorite Properties

The inspector highlights property values in bold if they differ from the default values. This allows for quick identification of object properties that have been changed during editing.

Note: Not all properties have default values, so not all properties may be highlighted.

Highlight Properties with Modified Values

 


 

Report Tree

A search feature for components by name has also been added to the report tree. To display the search bar, click the >> icon located at the bottom right of the tree. Additionally, you can select multiple items in the report tree using the CTRL key.

You can also call the editing menu using the right mouse button—it is similar to the menu that appears when you click on a component. When multiple components are selected, you can edit them all simultaneously. For example, you can hide all of them using the Visible property or delete them, for instance.

Search in the Report Tree

 


 

Data Tree

Data Tree

An interesting feature of the data tree is the ability to drag and drop fields onto the designer's workspace from the "DB Fields" tab. If you have activated the "Insert Field" or "Insert Header" buttons (buttons F and C in the image above), a frxMemoView will be created in the designer's workspace, either with the header text from the data field or bound to the data. If both buttons are pressed, two TfrxMemoView components will be generated—one with the field header and one bound to the data.

If the data is sourced from a TfrxDataSet, you can configure the type of component that gets created upon dragging in the editor of that component (within the Delphi IDE). Field groups can also be dragged. Additionally, if you select a dataset along with the fields, a band containing the data fields will be created.

Drag And Drop a Dataset with a Set of Fields

If a data field is dragged, the component name is created from the data set name and the data field name. You can also drag a data field onto an existing component. In this case, the component will be linked to the dragged data field (the previous value will be lost). A data field can also be dragged into any string property of the object inspector.

Drag and Drop a Data Field

The data tree also has two more tabs: "Functions" and "Classes," which display all the classes and functions available in the report. These can also be dragged into the report designer.

 


 

Report Designer Workspace

The report designer workspace has a number of interesting features that make a developer's life easier. On most controls, if they have event handlers, a small red triangle appears in the upper left corner.

If a TfrxMemoView component is placed on a band linked to a dataset, hovering the mouse over the component reveals a triangle on the right side (similar to a combo box). Clicking this triangle allows you to link a field from the band's dataset to the TfrxMemoView.

Data Field Selection

If the text component is not fully visible on the screen (cut off), hovering over the component will display a tooltip with the full content of that component. These tooltips can be disabled in the designer settings. To do so, go to the "View" menu -> "Settings" and uncheck the "Enable workspace hints" checkbox.

 


 

Extension Lines

Extension lines are a set of vertical and horizontal lines used for positioning report components. The visibility of extension lines can be controlled through sub-elements of the "View" menu. 

Extension Lines Management Menu

Extension lines – This menu item enables the use of extension lines. To create an extension line, double-click on the ruler at the top or side of the designer. Extension lines are displayed in blue.

Automatic Extension lines – Extension lines appear along every border of a component. If an extension line is created by the user and is not connected to a component border, it disappears. If it is connected, it turns brown. Creating custom extension lines in this mode is not possible.

Using Horizontal and Vertical Extension lines – These two menu items control the visibility of horizontal and vertical extension lines.

You can also adjust the visibility of extension lines using the button located at the intersection of the vertical and horizontal rulers in the upper left corner of the report designer editing area (screenshot below). This button cycles through extension line modes in the following order:
-    no automatic extension lines
-    all automatic extension lines
-    horizontal automatic extension lines
-    vertical automatic extension lines

Extension Line Button for Quick Control

To delete a custom extension line, simply move it outside of the designer area or right-click on the extension line pointer. In automatic extension line mode, you can convert these lines to custom lines and then revert them back to automatic. To do this, double-click on the extension line pointer on the ruler.

Extension lines are used to arrange report elements in the desired order. The key feature of extension lines is that component borders "stick" to extension lines when resizing components.

When dragging an extension line, all "sticked" component borders move with it. If the opposite border of a component is "sticked" to another extension line, the component changes its size. If the opposite border of the component is free, the component moves along with the extension line, and its size does not change (each of these settings can be disabled in the designer options, such as "Stick to Extension lines" and "Use Extension lines as Anchor").

Extension lines can also "merge" with each other—if one extension line is moved onto another, they will merge.

Thus, this allows you to quickly arrange report components on a custom grid using extension lines. This functionality is crucial when exporting a report to certain formats (for example, to an Excel spreadsheet), creating tabular reports without using grid components, and so on.

 


 

Additional Designer Toolbar Buttons

Highlight Intersecting Objects

The "Standard" toolbar now features two new buttons: "Highlight Intersecting Objects" and "Search."

The first button highlights intersecting objects, which are automatically highlighted in red in the image above. You can change the highlight color in the editor settings.

The second button opens the text search or replace window. In this window, you can specify the search area: search in component names, string property values, content, or script text. Content refers to, for example, the value of the Memo property of the TfrxMemoView component.

Search Across the Entire Report

Let's move on to search settings. If the "Case Sensitive" checkbox is enabled, lowercase and uppercase letters will be distinguished.

If the "Find All" checkbox is checked, the list of found items will be displayed in the panel below, with explanations of which report element the found text belongs to. Clicking on any item in the list will jump to the found element.

When the "Find All" checkbox is unchecked, clicking the "Find Next" button (or pressing the F3 key on the keyboard) will jump to the next found element. Transitions between elements are done through the "Data," "Page," or "Code" tabs depending on the active tab.

If the "Replace With" checkbox is checked, a window becomes active for entering the new text to replace the current text. The label on the "Find Text" button changes to "Replace." Now, when you click the "Replace" button, a dialog box like this appears:

Confirmation Dialog for Replacement

This dialog box allows you to confirm or cancel the text replacement. This functionality may be useful, for example, if you need to change the font of all components to another font. Or, for example, if you renamed a dataset that is actively used in scripts.

October 30, 2024

Using Styles When Creating Reports in FastReport VCL

The article discusses one of the new features of FastReport VCL — the use of styles and style sheets.
October 28, 2024

How to Set Up WSL 2 for Working with FastReport and FastCube

In this article, we will explore how to set up WSL 2 for working with FastReport and FastCube components in Lazarus for Linux.
September 19, 2024

How to troubleshoot the most common issues when installing FastReport VCL

We have compiled a list of the most popular problems when installing FastReport VCL and have prepared detailed instructions on how to fix the problems that have arisen.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.