Pagebreak problem ?

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
zekeriye
Posts: 32
Joined: Thu Sep 15, 2005 8:09 pm
Location: Turkey
Contact:

Pagebreak problem ?

Post 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 ;
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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;
zekeriye
Posts: 32
Joined: Thu Sep 15, 2005 8:09 pm
Location: Turkey
Contact:

Post by zekeriye »

Thanks for quick reply
Post Reply