TRichViewEdit and server DLL

General TRichView support forum. Please post your questions here
Post Reply
prosoft
Posts: 24
Joined: Tue Jul 11, 2006 8:51 am

TRichViewEdit and server DLL

Post by prosoft »

I want to create file on remote database server and this file send by email.
My problem is that TRichView wants parent window.
I have to use TRichView encapsulated in dll library.

Sergej wrote in december 2005 that this limitation will removed in next release.

http://www.trichview.com/forums/viewtop ... ght=parent

Is any new in this issue?

Is any chance how can i create document without view (parent window)

Josef.
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

In the latest version (available for registered users) TRVReportHelper does not require parent.
prosoft
Posts: 24
Joined: Tue Jul 11, 2006 8:51 am

Post by prosoft »

Yes, it works without parent.
But i have next problem. Can i use TRVReportHelper for creating documents?
My problem is that i want to create documents on server side by DLL library with TRVReportHelper and save it by RichView.SaveRTF method.. When i insert text i have no problem. But when i add table by AddItems procedure to document, RichView.SaveRTF raise exception 'AccessViolation' in

TCustomRVFormattedData.Format

What can be wrong? Is this using of TRVReportHelper right?
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Saving RTF with tables requires formatted document (because table grid must be calculated).
If SaveRTF detects that table is not formatted, it tries to format it. But if TRVReportHelper is not initialized, it fails.
Solution: call RVReportHelper.Init with any width as a parameter before calling SaveRTF.
Post Reply