General TRichView support forum. Please post your questions here
infrax
Posts: 31 Joined: Wed Aug 10, 2011 10:57 am
Post
by infrax » Fri Feb 10, 2012 10:31 am
I have this code:
Code: Select all
RichViewXml1.RichView := RVReportHelper1.RichView;
RichViewXml1.LoadFromFile('someXMLWithControls.xml');
//RVPrint1.OnPrintComponent := RVPrintComponent;
RVReportHelper1.OnPrintComponent := RVPrintcomponent;
//RVPrint1.AssignSource(RVReportHelper1.RichView);
//RVPrint1.FormatPages(rvdoAll);
//RVPrint1.Print('Test',1,true);
RVReportHelper1.Init(PrinterCanvas,4000);
RVReportHelper1.FormatNextPage(8000);
RVReportHelper1.DrawPageAt(0,0,1,PrinterCanvas,False,RVReportHelper1.GetLastPageHeight);
On RVReportHelper OnPrintComponent event is not fired. But if I use RVPrint (see commented code) OnPrintComponent fires OK. What am I missing?
Thanks
Sergey Tkachenko
Site Admin
Posts: 17566 Joined: Sat Aug 27, 2005 10:28 am
Contact:
Post
by Sergey Tkachenko » Fri Feb 10, 2012 3:51 pm
This is a bug.
If you have a source code, open RVItem.pas, find
TRVControlItemInfo.PrintToBitmap, change all occurrences of TPrintableRV to TCustomPrintableRV.
infrax
Posts: 31 Joined: Wed Aug 10, 2011 10:57 am
Post
by infrax » Wed Feb 15, 2012 8:52 am
Thx. It works now.