Topic: html printing as codes in report

Hello
i faced a problem with the result from the HTML editor
when the data is stored then requested in the report(SQL)
the result show the HTML code  not the text
the field I save in is TEXT

Re: html printing as codes in report

salahnecibi,
Not exactly sure what you are trying to do. It sounds like you are trying to import html code right into FastReport. I don't think you can do that. FastReport does allow some simple HTML tags in text objects. Look in the FastReport manual Chapter 2.4 (Page 19) for more information on that.


FastReport is robust enough for formatting that you do not need html tags for formatting, if that is what you are trying to do.

3 (edited by salahnecibi 2020-11-16 10:00:00)

Re: html printing as codes in report

ok i can explain more
i am using the richedit instead of textbox
when i save the data and again when I fetch it
it show codes not text

see the image

Post's attachments

Attachment icon 0001.png 91.68 kb, 186 downloads since 2020-11-16 

4 (edited by derek 2020-11-16 10:42:48)

Re: html printing as codes in report

Hi Salahnecibi,
I think you are meaning the RTF formatting codes.
If so, what is probably happening is that when you are in the Report Designer, you are dragging the datafield directly into the report or selecting the RTF component and then dragging the datafield into the RTF component?   In both instances, this will result in you seeing the formatting codes rather than the actual text..
You must first place an RTF component into the report.
Then you must specify the dataset and the datafield USING THE RTF object's properties (don't drag and drop it from the list of available datafields).
Please have a look at the screenshot (screenshot1.jpg) in the attached example which shows the steps to go through.
Derek.

Post's attachments

Attachment icon printrtf.zip 655.84 kb, 407 downloads since 2020-11-16 

Re: html printing as codes in report

derek wrote:

Hi Salahnecibi,
I think you are meaning the RTF formatting codes.
If so, what is probably happening is that when you are in the Report Designer, you are dragging the datafield directly into the report or selecting the RTF component and then dragging the datafield into the RTF component?   In both instances, this will result in you seeing the formatting codes rather than the actual text..
You must first place an RTF component into the report.
Then you must specify the dataset and the data field USING THE RTF object's properties (don't drag and drop it from the list of available datafields).
Please have a look at the screenshot (screenshot1.jpg) in the attached example which shows the steps to go through.
Derek.

I read your previous replies and the problem now solved thank you so much.
one more thing how creat a dynamic table in the fast report

Re: html printing as codes in report

Hi Derek,

I tried this on my end and I still get the codes and not the content of the text.
Is there anything else I have to do?

Thanks!

derek wrote:

Hi Salahnecibi,
I think you are meaning the RTF formatting codes.
If so, what is probably happening is that when you are in the Report Designer, you are dragging the datafield directly into the report or selecting the RTF component and then dragging the datafield into the RTF component?   In both instances, this will result in you seeing the formatting codes rather than the actual text..
You must first place an RTF component into the report.
Then you must specify the dataset and the datafield USING THE RTF object's properties (don't drag and drop it from the list of available datafields).
Please have a look at the screenshot (screenshot1.jpg) in the attached example which shows the steps to go through.
Derek.

Re: html printing as codes in report

Hi,
If you can attach your project (delete the .exe and then zip the application folder), I'm sure someone will be able to have a look and figure out what the problem is.
Regards
Derek

8 (edited by Destiny 2023-05-22 09:32:07)

Re: html printing as codes in report

For me it works, all the code is transcribed into text.

Post's attachments

Attachment icon Texte.jpg 54.03 kb, 46 downloads since 2023-05-22 

Destiny

Re: html printing as codes in report

I tried to upload and the file is too large.
Then I uploaded it to Dropbox,but it does not allow me to post the link.
Any other options?

Thanks!

joceravolo wrote:

Hi Derek,

I tried this on my end and I still get the codes and not the content of the text.
Is there anything else I have to do?

Thanks!

derek wrote:

Hi Salahnecibi,
I think you are meaning the RTF formatting codes.
If so, what is probably happening is that when you are in the Report Designer, you are dragging the datafield directly into the report or selecting the RTF component and then dragging the datafield into the RTF component?   In both instances, this will result in you seeing the formatting codes rather than the actual text..
You must first place an RTF component into the report.
Then you must specify the dataset and the datafield USING THE RTF object's properties (don't drag and drop it from the list of available datafields).
Please have a look at the screenshot (screenshot1.jpg) in the attached example which shows the steps to go through.
Derek.

Re: html printing as codes in report

So I was able to finally print the RTF data from the file.
What I ended up doing was using a report variable RTFText and the OnGetValue method of the FRXReport component.
On the procedure, I check for the RTFText variable and then load the RTF data into a VCL component and export it to a file.
I keep that component invisible since it's only used for that purpose.
Then I load that file into a StringList and assign it to the variable.
I really dislike this solution, but the issue that the VCL components I am using (TMS) do not talk well with the FastReports RTF component without some conversion.
If anyone is interested I can go into detail and share the solution. Bear in mind that my solution is counting on a few components by TMS.