Can't find what you are looking for? Try these pages!


DataFlex Reports v6 Highlights

By Vincent Oorsprong

DataFlex Reports is a versatile and comprehensive tool for delivering reports to support business operations. The latest release, version 6.0, delivers many new features and bug fixes - too many to list in this blog, so let’s concentrate on some of the highlights…

Barcode Support

In version 5 and earlier, it was possible to use barcodes by using a free or purchased barcode font. While this works fine in a preview and for printed reports, Windows 10 does not allow the barcode fonts to be included in a generated PDF. To provide full PDF functionality on Windows 10, DataFlex Reports v6 now comes with native barcode support for over 70 different barcode types including QR barcodes. Internally, the barcode is a picture so it works well when previewing, printing and exporting to PDF and other formats.

To use the barcode simply right click an object that contains information that needs to be presented as a barcode and select the option “Barcode” from the floating menu:

Select Barcode on Floating Menu

Then open the field properties and click the barcode tab-page. In here select the barcode type that needs to be used and set the height. The height tells how high the barcode needs to be and will be used to scale the image inside the object’s container:

barcode settings in field properties

Embedded SQL

DataFlex Reports’ built-in functions are extended to include an SQL() function. Any SQL statement can be placed inside the parentheses as long as it can be executed in the same data-source context (usually this means the same database). Getting the description from a code validation table would be a perfect example for use of the SQL() function.

return SQL(“select [Description] from [codemast] where
[code]=’”+{Orderhea.Ship_Via}+”’ and [type]=’SHIPPING’”)

Tip: Try the SQL statement first in the native tools for the database; in case of Microsoft SQL it’s the SQL Management Studio environment.

Select Case Statement

The language used for functions inside DataFlex Reports is “VB-like,” meaning that it follows the Visual Basic syntax but is not equal to Visual Basic. Version 6 comes with a language enhancement in the form of a Select Case statement. In the past, getting the right result from a function might require a long list of IF statements. The new Select Case makes this simpler, comparable to what was added in the early days of DataFlex Windows development. Compare these screenshots to discover why Select Case is easier to understand and maintain than IF statements:

multiple ifs

select case statement

Performance Improvement

Version 6.0 comes with a JIT (Just-In-Time) function compiler. Executing version 6 functions becomes much faster than the interpreted functions of previous versions because functions that are executed over-and-over again are now compiled once and then “just” executed without repetitive interpretation. The improvement is especially noticeable with reports containing a large number of formatting functions. Test results show performance enhancements up to 10 times compared to prior versions.

RDS Binary Columns

When defining columns for an RDS table it is no longer necessary (or even possible) to specify the length for a binary or memo column. In older versions, one had to guess the needed memory for these columns; now it is dynamic, allowing large amounts of data to be passed from a DataFlex program to a DataFlex Reports report. As an example, think of sending the contents of a picture that’s read from disk or created using the DataFlex Graphics Library. As of DataFlex Reports version 6, the length for the column cannot be specified.

Anchor Support

Objects in a report’s section can now be anchored, which means they keep the same distance to the top or bottom of the section, or get resized when the section grows during report development. This screenshot shows the situation before the section height was increased:

Anchors - before resizing section

This screenshot shows the situation after resizing the section:

Anchors - after resizing section

Preview Waiting GIF

A small enhancement of the integration library can be found in displaying an animated GIF during loading of the report data and formatting the pages. Use this as an alternative to displaying progress information in a status panel. The GIF does not tell the user about the exact progress; rather it’s a "nice" solution to keep a user from closing the application. As examples, our creative department created a couple of spinning DataFlex Reports logo GIF files that are distributed via the integration library:


New Preview Output Class

In earlier DataFlex Reports versions, when integrating reports in a DataFlex application, developers could choose from a list of 4 options (Embedded, MDI, ModalPanel and ToolPanel). Version 6.0 adds another option named DesktopView. Functionally, DesktopView is a mix between a ModalPanel and a ToolPanel, where the output window creates a new icon on the Windows taskbar:

desktopview example

Tab Workspace Support

When using version 6 with DataFlex 19.0, one can choose to use tabbed workspaces (read more about this feature in the new DataFlex documentation). When tabbed-workspaces are selected, the DataFlex Reports integration class used when creating an MDI view automatically adapts the tabbed workspace concept without any developer interaction. These class changes are only valid for DataFlex 19 and further.

No more cWebDRReport Class

All functionality of this class (introduced in version 5) has been merged in the main class (cDRReport) where Web specific methods and properties are hidden for Windows style applications, and vice-versa.


Past versions of DataFlex Reports delivered documentation in two formats - PDF and CHM files. This has been replaced with a better and more complete Help file. In addition, the Help file can be accessed from the DataFlex Studio. For example, point an object of the cDRReport class and press F1 to read the documentation about the class.

There’s more!

The enhancements listed above are the highlights; there are many more valuable additions to DataFlex Reports version 6 as well as bug fixes. For the complete set of enhancements and fixes, see the details about DataFlex Reports v6.