Page 1 of 1
ScaleRichView, ReportBuilder and printing headers/footers
Posted: Tue Jul 29, 2025 9:49 am
by GoranBru
Hi,
very simple question. We use Delphi Sydney and have installed RB 22.06, TRichView 22.4 and ScaleRichView 12.3. The report in RB is very simple just TDBRichView component, A4 paper with margins set to zero and I want to print the document saved in database made by forementioned ScaleRichView with headers and footers. The document is saved as RTF in the database and is loaded in the software as it should be but on printed reports only main document is printed without headers and footers. Is this a known limitation/feature or am I missing something?
Best regards,
Goran
Re: ScaleRichView, ReportBuilder and printing headers/footers
Posted: Fri Sep 12, 2025 7:58 am
by GoranBru
Hi,
it passed several weeks after my initial post, I asked on ReportBuilder forum if there is any possibility to print headers and footers but I am still in the dark. The problem is that whole big software is working on ReportBuilder reports and I am not really happy to introduce yet another reporting service in the application as there are some further actions involved with reports. Medical reports uses the most of TScaleRichView features but it has some extra actions after the report is done (Signing and PDF export to national database for example) which now works with RB so I would really appreciate if there is a possibility to use RB to print out headers and footers...
Best regards,
Goran
Re: ScaleRichView, ReportBuilder and printing headers/footers
Posted: Fri Sep 12, 2025 2:54 pm
by Sergey Tkachenko
The current version of ppRichView does not support headers and footers.
It is based on an internal TRVReportHelper component that supports only the main document.
It is supposed that headers and footers are created using ReportBuilder objects, since their report have header and footer areas.
Theoretically, it is possible to create another TRichView for ReportBuilder wrapper objects based either on ScaleRichView or on TRVPrint in "virtual printer" mode. They both support headers and footers. But this is a low-priority feature: too much work, and very few customers need it, sorry.
I suggest creating headers using ReportBuilder.
Re: ScaleRichView, ReportBuilder and printing headers/footers
Posted: Mon Sep 22, 2025 6:18 am
by GoranBru
Hi Sergey,
it is not a problem making headers and footers in RB but how to copy header and footer from one component to another? Do You have any example?
Best regards,
Goran
Re: ScaleRichView, ReportBuilder and printing headers/footers
Posted: Wed Dec 03, 2025 9:23 am
by Sergey Tkachenko
If you load a document with headers and footers in TSRichViewEdit, you can access headers and footers using
SubDocuments[] property.
Also, you may wish to check properties of
PageProperty: TitlePage, FacingPages.
Without ScaleRichView, it's more difficult. TRichView does not store headers and footers.
Option 1:
Using separate TRichViews for the main document and each header and footer.
See the demo in Assorted\Printing\Headers\
Option 2:
Use a non-visual class
TRVReportHelperWithHeaderFooters.
Once you loaded headers/footers, you can copy it to TMemoryStream (using SaveRVFToStream method), and then load in another component (using LoadRVFFromStream).