Page 1 of 1

RichViewEdit without visual component

Posted: Thu Nov 29, 2012 9:37 am
by AXSchmidt
Hello,

is it possible to use richviewedit without a visual component?

I need to load a rtf file, perhabs change header/footer, insert text and at least print/save the document.

Posted: Thu Nov 29, 2012 11:32 am
by Alexander_Dober
Hello,

I think you can use TRVReportHelper for that. There should be some threads about it here.

Posted: Thu Nov 29, 2012 11:44 am
by AXSchmidt
But i think the TRVReportHelper only assist RichView?
And in my oppinion its not possible to insert text in RichView or edit header/footer!?

Posted: Thu Nov 29, 2012 2:11 pm
by Sergey Tkachenko
TRVReportHelper contains an invisible TRichView inside that can contain a document. It can be placed in a datamodule and does not require visual components.

For a header and a footer, you need to create additional reporthelpers, and assign

Code: Select all

RVHelperMain.RichView.RTFProperties.SetHeader(RVHelperHeader.RichView.RVData);
RVHelperMain.RichView.RTFProperties.SetFooter(RVHelperFooter.RichView.RVData);
Now, when you load RTF in RVHelperMain.RichView, headers and footers will be loaded in RVHelperHeader.RichView and RVHelperFooter.RichView.

Posted: Fri Nov 30, 2012 8:10 am
by AXSchmidt
ok, thank you.

and can you tell me at least for example, how can i find a placeholder in the header and how to replace it?

thanks a lot...

Posted: Fri Nov 30, 2012 2:19 pm
by Sergey Tkachenko
All demos replacing fields to values are collected here: http://www.trichview.com/forums/viewtopic.php?t=8

They work with TRichView (or TRichViewEdit), but can be applied to RVReportHelperHeader.RichView.