TRichView 21.6 - decimal tabs, ReportWorkshop for Lazarus

News about TRichView, ScaleRichView, ReportWorkshop, RVMedia
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

TRichView 21.6 - decimal tabs, ReportWorkshop for Lazarus

Post by Sergey Tkachenko »

We've released TRichView v21.6, ScaleRichView 12.1, ReportWorkshop 5.3.

Trial versions are available here: https://www.trichview.com/download/

Main changes in this update:
  • ReportWorkshop is ported to Lazarus
  • Decimal tabs
Previous version:
https://www.trichview.com/forums/viewtopic.php?t=11963
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

ReportWorkshop for Lazarus

Post by Sergey Tkachenko »

ReportWorkshop for Lazarus

ReportWorkshop is a set of rich-text reporting components (add-on for TRichView).

ReportWorkhop has been ported to Lazarus, for Windows platform.
ReportWorkhop itself does not contain platform-dependent features, but it requires TRichView, and TRichView supports only Windows Lazarus platform.

Components and actions

Everything is ported: report generator component (TRVReportGenerator), universal database data provider (TRVReportDBDataProvider), all report editing actions, TRVShape component, a shape object for documents.

Lazarus has its own set of data access components, so it requires its own data providers.

This version of Report Workshop implements:

Image TRVReportSQLDataProvider provides access to various SQL databases (using TSQLQuery internally). Data queries: either table name, or SQL SELECT statement

Image TRVReportDbfDataProvider provides access to DBF files in the specified folder (using TDbf internally). Data queries: table name, with optional filter string.

Both these data providers can be used to create master/detail and cross-tab reports, both of them are supported by the report wizard action.

Demo projects for Lazarus

New demo projects are in <TRichView Dir>\ReportWorkshop\Demos\Lazarus\ folder

There are two demo projects: for Firebird databases and for DBF tables.

Firebird folder includes a full set of demos for Firebird, mainly using TRVReportSQLDataProvider (one demo uses TRVReportDBDataProvider).
The only unavailable demo is "4 - Master-detail predefined", which should show how to make master/detail reports without SQL statements. It is not available because TSQLQuery does not allow to specify a reference to a master dataset.
The most interesting demos are: ReportEditor (report editor with TRichViewEdit) and ScaleRichViewReportEditor (report editor with TSRichViewEdit)

Dbf folder includes only ReportEditor and ScaleRichViewEditor demos. To provide data, select a directory containing DBF files.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

GDI+ support for Lazarus

Post by Sergey Tkachenko »

GDI+ support in Lazarus

Update 2023-10-01: this topic is corrected to reflect changes made in version 21.7.1. Version 21.6 used another GDI+ library for Lazarus. Version 21.7.1 supports them both.

While GDI+ is not used in TRichView directly, it may be used in add-on components:
  • in ScaleRichView for SRVControls
  • in ReportWorkshop for shapes and value visualizers
GDI+ provides anti-aliased lines, semitransparency, gradients.
While GDI+ is an old technology, it is still very useful, because it is possible to draw content using both GDI (standard Windows functions) and GDI+ functions, and GDI+ supports printing.
In Delphi, support of GDI+ is automatically enabled in Delphi XE2 and newer, and is not available in older versions of Delphi.
In Lazarus, support of GDI+ is implemented in a separate package.
To enable it in Lazarus:
  • Download GDI+ Library for Delphi and Lazarus and compile LazGDIPlus.lpk. Alternatively, you can install this package from Lazarus Online package manager (menu "Package | Online Package Manager...")
  • Compile <TRichView Dir>\TRichView\Source\rvgdipluslaz.lpk (Note: it is included in <TRichView Dir>\TRichViewLazarus_Optional.lpg project group)
  • Include a reference to rvgdipluslaz package in your project (Menu "Project | Project Inspector" to open Project Inspector window. Right click "Required Packages", select menu "Add...". Select RVGDIPlusLaz)
  • Include the unit RVGDIPlusGrInLaz in "uses" of the main form unit.
Note: "GDI+ Library for Delphi and Lazarus" can be used in Delphi 2009 and newer, so it is theoretically possible to enable GDI+ support in Delphi 2009, 2010, and XE too, by including RVGDIPlusGrInLaz unit in your project and adding it in "uses" of the main form unit. Not tested, though.

Example:

Lazarus ReportEditor demo for Firebird databases, without GDI+:
Value-Visualizer-GDI.png
Value-Visualizer-GDI.png (46.48 KiB) Viewed 39732 times
Lazarus ReportEditor demo for Firebird databases, with GDI+:
Value-Visualizer-GDIPlus.png
Value-Visualizer-GDIPlus.png (51.2 KiB) Viewed 39732 times
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Decimal tabulators

Post by Sergey Tkachenko »

Decimal tabulators

In this update, a new option is added for tab alignment - rvtaDecimal.
When you work with numbers, setting a decimal tab makes numbers, such as amounts of currency, align correctly in a column. They are aligned at the position of decimal separator.

Decimal tabs are supported in Microsoft Word documents, so they can be saved and loaded in DocX and RTF files.
HTML does not support tabs.

RichViewActions (a set of components and actions for creating UI for a word processor) support decimal tabs in the ruler component and in the dialog of paragraph properties.
Paragraph Dialog with Decimal Tab.png
Paragraph Dialog with Decimal Tab.png (8.83 KiB) Viewed 39729 times

This screenshot shows using of decimal tabs in ReportWorkshop report:

Decimal Tabs.png
Decimal Tabs.png (44.84 KiB) Viewed 39729 times
Of course, Report Workshop allows formatting numbers by defining the count of characters in a fractional part of a number, but this screenshot is a good example to show how the decimal alignment works.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

RTF and DocX

Post by Sergey Tkachenko »

Improvements in read/write of RTF and DocX files

Fields

TRichView can process some RTF/DocX fields, but not all of them. It understands fields representing hyperlinks, external pictures, numbered sequences, page numbers and counts, and some other types of fields. If you want to process more types of fields, you can use the new event: OnReadField. In this event you can insert your own content (either one non-text item, or text (that can be multiline)) in place in RTF/DocX field.

Footnotes and endnotes

TRVStyle has 3 properties related to footnotes and endnotes: Since this update, these properties can be written and read to DocX and RTF files.
Post Reply