trichview.support
Error in TRVPrint.FormatPages(rvdoALL) (with Footer & Header) |
Author |
Message |
Tavo |
Posted: 10/23/2002 4:01:32 I am trying to send documents to impression that I visualize in a TDBRichViewEdit dynamically created. Everything works well. But a problem appears now when I want to print also a Footer and a Header. What I do is to create a TDBRichViewEdit, and two TRichView, the TRichViewEdit is connected to the field blob. I'm loading the documents in both TRichView (footer and header) via of Streams from fields blob. Attempt to print of the following way: LoadRVFromField(Rv_Footer,DM_.TbFooterField) ; // My function RichPrn.SetFooter(Rv_Footer.RVData) ; Rv_Footer.Format ; LoadRVFromField(Rv_Header,DM_.TbHeaderField) ; // My function RichPrn.SetHeader(Rv_Header.RVData) ; Rv_Header.Format ; RichPrn.AssignSource(RichV_Process) ; RichPrn.FormatPages(rvdoALL); // Here appears the error if RichPrn.PagesCount>0 then RichPrn.Print('LawyerTools - Escrito',1,False) ; Function LoadRVFromField( rv : TCustomRichView ; Fld : TBlobField ) : Boolean ; var TempStream : TBlobStream ; begin TempStream := TBlobStream.Create(Fld , bmRead ) ; Try Result := rv.LoadRVFFromStream(TempStream) ; if Result then rv.Format else ShowMessage('No Load') ; Finally TempStream.Free; End ; end ; I get the error "LIST INDEX IS OUT OF BOUNDS" I am thinking that it must be related with a TextStyles.Count and ParaStyles.Count. Both TRichView and TRichViewEdit are linked with a same global TRVStyle and have the following values: RTFReadProperties.ParaStyleMode := rvrsAddIfNeeded ; RTFReadProperties.TextStyleMode := rvrsAddIfNeeded ; RVFOptions := [ rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveTextStyles, rvfoSaveParaStyles ] ; Without Footer and Header all work fina. Where I can begin to look for a clue? Thanks Tavo. |
Powered by ABC Amber Outlook Express Converter