RVPrint support background image in Header ?

General TRichView support forum. Please post your questions here
Post Reply
nostradumbass
Posts: 6
Joined: Tue Jun 24, 2008 2:00 am

RVPrint support background image in Header ?

Post by nostradumbass »

[ Using TRichViewEdit v10.2 ]

RVPrint does not support header background image?

I am assigning a background image to a RichView and then assigning this to RVPrint using SetHeader method. But the preview does not show the background image. Is this not supported?

I need to impose text on top of a image (in the header) so I really need background image.

My code:

Building the header richview:

Code: Select all

 var
 x : integer;
 p : TJpegImage;
begin
 //  clear header, content
   rV1.Clear;
   rVHdr1.Clear;

 // header - image
   p := TJpegImage.Create;
   p.LoadFromFile(TEMPLATESPATH + cmbMainPresetHeader.Text);
   rVHdr1.BackgroundStyle := bsStretched;
   rVHdr1.BackgroundBitmap := TBitmap(p) ;
   rVHdr1.Invalidate;

 // header - text
   with rvStyleHdr.TextStyles.Add do
   begin
     FontName :=  strToFont(setupInfo.textFont.FontName, defaultFont).Name ;
     Size := strToFont(setupInfo.textFont.FontName, defaultFont).Size;
     Color := strToFont(setupInfo.textFont.FontName, defaultFont).Color;
     Style :=  strToStyle(setupInfo.textFont.FontStyle) ;
     StyleName := 'HEADER';
   end;

   x:=rvStyleHdr.TextStyles.Count-1;

   with rVHdr1 do
   begin
    AddNL( txtHeaderLine1.Text, x, -1);
    AddNL( txtHeaderLine2.Text, x, 0 );
    AddNL( txtHeaderLine3.Text, x, 0 );
    Format;
   end;

Previewing :

Code: Select all

     
    setReportText;
    rvPrint.SetHeader(rvHdr1.RVData);
    rvPrint.AssignSource(rV1);
    rvPrint.FormatPages(rvdoALL);
    RVPrintPreview1.UpdateView;
Regards,
ND
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

No, it's not supported, sorry.
But you can use table width background image in headers.
nostradumbass
Posts: 6
Joined: Tue Jun 24, 2008 2:00 am

Post by nostradumbass »

Thank you.
Post Reply