RV does not display in a TeditBox

General TRichView support forum. Please post your questions here
Post Reply
Tony Blomfield
Posts: 7
Joined: Fri Nov 17, 2006 7:55 am

RV does not display in a TeditBox

Post by Tony Blomfield »

Hi. I was using an older version of DBRV, and the text from the DBRV would also display in a standard grid column. Of course there were some strange symbols of the user added non text items.

Now I have down loaded V1.9.8 and it no longer displays in the grid text column. Just a couple of numbers. the DBRV displays fine, but if I add on a normal DBMemo or Edit box, then it does not display.

Can you advise what I need to do to rectify this?

Please excuse me if I have incorreclty used the Forum. It is my first post.


Thanks,

Tony
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you send me a simple project to reproduce this problem?
Tony Blomfield
Posts: 7
Joined: Fri Nov 17, 2006 7:55 am

Post by Tony Blomfield »

Sorry, I do not have a simple demo for this. I am using TDBRichViewEdit.

If I attach a Tmemo to the same field, when I save some RtF text, here is what I see in the Memo control ie This is what is actually saved to the Database field

-8 1 3
0 3 0 0 0 0
here is some text

How can I get rid of the numbers in fron of the text?

Many thinks.
Tony Blomfield
Posts: 7
Joined: Fri Nov 17, 2006 7:55 am

Post by Tony Blomfield »

I have experimented somewhat, and found that if I set the fieldFormat to Text, then it works the way I want. However, in this case I dont have any of the RTF features such as Tables, Bulletts etc.

So I would like to return to my original problem statement and phrase it differently.

I want to display Records in a Grid (Dev express Grid) and want to show the first line of my RTF text in the grid. From the Grid, my users will go to a detail form to edit or add new RTF docs.

how can I display the first line of RTF in the Grid ?

Many thanks,

Tony Blomfield
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Code: Select all

-8 1 3 
0 3 0 0 0 0 
here is some text 
- this is RVF code loaded as text.
It happens when there is an error loading RVF from field. DBRichViewEdit, if it cannot load RVF, loads field content as a plain text, so you can see these RVF codes.

I think the error is because of not saving styles.
Right click DBRichViewEdit in Delphi, choose "Settings" in the popup menu, select "Allow adding styles dynamically". Also set DBRichViewEdit.AutoDeleteUnusedStyles = True.
Tony Blomfield
Posts: 7
Joined: Fri Nov 17, 2006 7:55 am

Post by Tony Blomfield »

This did not fix the problem. Even if I connect a standard Dephi Rich view component to the same field I see these codes.

Also, I have just discovered that if I add a Table into the RTF, then save: WHen I try to access or open the RTF after having saved a table, then the CPU goes to 100% and I have to kill the process.

Thank you in advance for your help.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Existing documents cannot be loaded in this way, only new documents.
To load existing documents (saved without styles), include rvfoConvUnknownStylesToZero in RVFOptions.

Which type of field do you use? May be it cannot store binary data, only plain text data? In this case, RVF with styles and tables cannot be stored there (only if you exclude rvfoSaveBinary from RVFOptions)
Post Reply