Page 1 of 1

TRichViewEdit and server DLL

Posted: Tue Oct 16, 2007 7:44 am
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.

Posted: Tue Oct 16, 2007 8:19 am
by Sergey Tkachenko
In the latest version (available for registered users) TRVReportHelper does not require parent.

Posted: Wed Oct 17, 2007 2:27 pm
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?

Posted: Wed Oct 17, 2007 4:13 pm
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.