Render and print HTML content using ReportBuilder
Render and print HTML content using ReportBuilder
Hi,
I need to render and print simple HTML content from a Mariab Text field using ReportBuilder 22.0, Zeoslib 7.2.14 and Delphi 11.3.
I tried to put the Advanced DBRichText component in report deginer but all I get is the raw HTML code, not the rendered one.
What do I need to do?
P.S. We are using your last demo version because we are trying different products in order to decide wich one we'll use in our company.
Thank you,
Ricardo.
I need to render and print simple HTML content from a Mariab Text field using ReportBuilder 22.0, Zeoslib 7.2.14 and Delphi 11.3.
I tried to put the Advanced DBRichText component in report deginer but all I get is the raw HTML code, not the rendered one.
What do I need to do?
P.S. We are using your last demo version because we are trying different products in order to decide wich one we'll use in our company.
Thank you,
Ricardo.
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Render and print HTML content using ReportBuilder
Probably, TRichView does not recognize the document content as HTML, so it loads it as a plain text.
Currently, TRichView detects HTML by the presence of "<html" or "<head" withing the initial 1024 characters of the document.
Do you documents have these substrings?
And are they in lower case?
The current version of TRichView has a bug in HTML detection in Unicode (UTF-16) encoding (and this is the encoding that usually ReportBuilder provides): it recognizes HTML only if "<html" or "<head" are written in lower case.
It will be fixed in the next update.
Currently, TRichView detects HTML by the presence of "<html" or "<head" withing the initial 1024 characters of the document.
Do you documents have these substrings?
And are they in lower case?
The current version of TRichView has a bug in HTML detection in Unicode (UTF-16) encoding (and this is the encoding that usually ReportBuilder provides): it recognizes HTML only if "<html" or "<head" are written in lower case.
It will be fixed in the next update.
Re: Render and print HTML content using ReportBuilder
Thank you for your answer. I've turned the original <HTML> into <html> and it worked.
Another question: How to change the font size? The Advanced DBRichText component is not taking the font size set in report designer.
example:
<html>
<head></HEAD>
<BODY>
<P><EM>Animals</EM> are <B>incredible</B>. Este é um teste de
parágrafo.</P>
<P>Este é outro <U>parágrafo</U>.</P>
<P> </P>
<P>Fim do documento.</P>
</BODY></HTML>
Another question: How to change the font size? The Advanced DBRichText component is not taking the font size set in report designer.
example:
<html>
<head></HEAD>
<BODY>
<P><EM>Animals</EM> are <B>incredible</B>. Este é um teste de
parágrafo.</P>
<P>Este é outro <U>parágrafo</U>.</P>
<P> </P>
<P>Fim do documento.</P>
</BODY></HTML>
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Render and print HTML content using ReportBuilder
If font size is not defined in HTML, default settings are used.
They are in RVDefaultLoadProperties global variable.
Change DefaultFontSizeDouble property.
The default value is 24 meaning 12pt.
They are in RVDefaultLoadProperties global variable.
Change DefaultFontSizeDouble property.
The default value is 24 meaning 12pt.
Re: Render and print HTML content using ReportBuilder
Thank you. Just two more questions to help me decide on the purchase.
1) Is it possible to make the \r\n become a <br> on the end of the line? Just to make our text cleaner? Or do I need to make some OnBeforePrint replace?
2) On report print preview there's a little red thing before the html rendering, as shown in atachment below. It is because of trial version?
1) Is it possible to make the \r\n become a <br> on the end of the line? Just to make our text cleaner? Or do I need to make some OnBeforePrint replace?
2) On report print preview there's a little red thing before the html rendering, as shown in atachment below. It is because of trial version?
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Render and print HTML content using ReportBuilder
1) Sorry, no, there is no option to treat line breaks in HTML code as line breaks in a final document. You should replace them to <br>
2) I never tested ReportBuilder with the trial version of TRichView, but i really looks like "unregistered" text written with a small font
(because ppRichView renders content using very large fonts, and displays it scaled down)
2) I never tested ReportBuilder with the trial version of TRichView, but i really looks like "unregistered" text written with a small font
(because ppRichView renders content using very large fonts, and displays it scaled down)
Re: Render and print HTML content using ReportBuilder
Ok. Thank you.
Now about the purchase of your product: In order to get the integration with report builder, just like we did in with trial version, only TRichView is enough? We need license for 2-3 developers.
Regards,
Ricardo.
Now about the purchase of your product: In order to get the integration with report builder, just like we did in with trial version, only TRichView is enough? We need license for 2-3 developers.
Regards,
Ricardo.
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Render and print HTML content using ReportBuilder
Yes, only TRichView is enough.
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Render and print HTML content using ReportBuilder
The problem with uppercase UTF-16 HTML detection is fixed in TRichView 22.4