trichview.support
Re: All record in one RVPrint |
Author |
Message |
Sergey Tkachenko |
Posted: 11/20/2002 12:36:17 This is may be a solution (may be with changing AddNL to InsertRVFFromStream) - creating one large document from all database records. Not a very good solution, if the database if huge. Otherwise, you need to print documents one by one. There are several undocumented methods allowing to print documents in the single printer job. It's even possible to start printing the next document on the same page as previous document. Example: printing two documents: RVPrint.AssignSource(RichView1); Printer.BeginDoc; RVPrint.StartAt := 0; RVPrint.TransparentBackground := True; RVPrint.FormatPages(rvdoALL); RVPrint.ContinuousPrint; RVPrint.StartAt := RVPrint.EndAt+60; // 60 pixels spacing between documents RVPrint.AssignSource(RichView2); RVPrint.FormatPages(rvdoALL); RVPrint.ContinuousPrint; Printer.EndDoc; I think it's not very difficult to modify this example for arbitrary number of documents. There are two problems: - preview is not available in this mode, at least not with TRVPrintPreview; - you need to check, if there is enough space to print at least one line of the next document (probably, it will work correctly even in this case, but I did not test) > > Something like this? > > RichView1.Clear; > with Table1 do begin > First; > while not EOF do begin > RichView1.AddNL(FieldByName('Name').AsString, 0, 0); > Next; > end; > end; > RichView1.Format; > RVPrint1.AssignSource(RichView1); > RVPrint1.FormatPages(rvdoALL); > if RVPrint1.PagesCount>0 then begin > frmPreview.rvpp.RVPrint := RVPrint1; > frmPreview.ShowModal; > end; > > > Hope it helps. > > > "Laura" <lcordova@cgpj.jalisco.gob.mx> wrote: > > > >I need to see all the records of my database in a single (one)preview, > as > >I can make it in a quick way. |
Powered by ABC Amber Outlook Express Converter