I'm using a registered Trichview v1.9 with D7.
In my application I encounter trouble when adding headers and/or footers
to RVprint.
Using : richview1 with rvStyle1
richeditfooter with rvStyleFooter
richeditheader with rvStyleHeader
rvPrint1
rvPrintPreview with rvPrint1
related parts of code:
Code: Select all
.....
RichviewEditHeader.Clear;
//RichviewEditHeader.DeleteUnusedStyles(True,True,True);
RichView1.RTFReadProperties.SetHeader(RichViewEditHeader.RVData);
RichviewEditHeader.LoadRTF(path1);
RichviewEditHeader.Format;
.....
RichviewEditFooter.Clear;
//RichviewEditFooter.DeleteUnusedStyles(True,True,True);
RichView1.RTFReadProperties.SetHeader(RichViewEditFooter.RVData);
RichviewEditFooter.LoadRTF(path2);
RichviewEditFooter.Format;
.....
Richview1.Clear;
//RichView1.DeleteUnusedStyles(True,True,True);
RichView1.Format; // uit voorbeeld headers-footers demo
Richview1.BackGroundStyle:=bsTiled; //bsStretched,bsTiledAndScrolled;
Richview1.BackGroundBitmap:=BGbitmap1;
Richview1.Style:=RVStyle1;
.....
Richview1.Clear;
//RichView1.DeleteUnusedStyles(True,True,True); // uit voorbeeld
RichView1.Format;
.....
Richview1.AddPicture(MFile2resized);
Richview1.Format;
.....
Richview1.format;
rvPrint1.StartAt := MaxHeight;
rvPrint1.AssignSource(Richview1);
.....
rvPrint1.SetHeader(RichViewEditHeader.RVData);
.....
rvPrint1.SetFooter(RichViewEditFooter.RVData);
.....
commands rvPrint1.SetHeader() and rvPrint.SetFooter().
With these commands (wanting headers and footers) the
following line causes a list index out of bounds :
Code: Select all
.....
NofPages := RVPrint1.FormatPages(rvdoAll);
.....
Code: Select all
procedure TCustomMainPtblRVData.FormatNextPage(var i, StartAt, StartY, Y: Integer; var Splitting: Boolean; MaxHeight: Integer);
Code: Select all
pi := GetRVStyle.ParaStyles[GetItemPara(DrawItems[nextnewline-1].ItemNo)];
Can you give me a Hint for the probable cause ?
regards,
Sander