Page 1 of 1

Pagebreak problem ?

Posted: Thu Jul 24, 2008 6:45 pm
by zekeriye
Hi;

We used srichview component to an editor and a report tool.
When using report tool we filling some data from database to editor. Some of our report are page based, some of report are line based.

Using page based report; after fiiling a page we insert a pagebreak and new report template from a file (or database). But we can not any different pagebreak code. Our code look like this;

..... FORMRTF.SCALERV.RICHVIEWEDIT.ENDITEMMODIFY(XITEMNO,XDATA);
FORMRTF.SCALERV.RICHVIEWEDIT.CLEARUNDO;
FORMRTF.SCALERV.RICHVIEWEDIT.SETSELECTIONBOUNDS(FORMRTF.SCALERV.RICHVIEWEDIT.ITEMCOUNT-1,0,FORMRTF.SCALERV.RICHVIEWEDIT.ITEMCOUNT-1,0);
FORMRTF.SCALERV.RICHVIEWEDIT.INSERTTEXT(' '+CHR(13));
FORMRTF.SCALERV.RICHVIEWEDIT.INSERTPAGEBREAK;
FORMRTF.SCALERV.RICHVIEWEDIT.INSERTTEXT(' '+CHR(13));
FORMRTF.SCALERV.RICHVIEWEDIT.SETSELECTIONBOUNDS(FORMRTF.SCALERV.RICHVIEWEDIT.ITEMCOUNT-1,0,FORMRTF.SCALERV.RICHVIEWEDIT.ITEMCOUNT-1,0);
FORMRTF.SCALERV.RICHVIEWEDIT.INSERTRTFFROMFILEED(XXPROGDIR+'TEMP\'+XFILE);
.....

But we can'not see any pagebreak at the report. We saw only two line ( two chr(13).

Have you got any idea to solve this problem ?

Thanks ;

Posted: Thu Jul 24, 2008 7:23 pm
by Sergey Tkachenko
I confirm this is a bug in TRichViewEdit: inserting item at the beginning of page removes the page break.
It will be fixed in the next update.
Quick fix: open RVERVData.pas, add after the line 1767 (info.BR := GetItem(InsertPoint).BR;):

Code: Select all

        info.PageBreakBefore := GetItem(InsertPoint).PageBreakBefore;

Posted: Wed Sep 03, 2008 6:59 pm
by zekeriye
Thanks for quick reply