Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Page colour

edited April 2003 in General
Yo,
How does one change the page colour on a previewed report. A number of
people have clWindow (i.e. "Window" item in screen settings) as something
other than white and the background colour of the page defaults to that
colour (clWindow). Need to be able to hard-code to page colour to clWhite.

Gilbert Grant
Cura Risk Management Software

Comments

  • edited April 2003
    Open up your copy of RBuilder\Source and change TppViewer.Create to set the
    FPageColor variable to clWhite. Then rebuild RB using this version of RB.
    You'll have to change this everytime you install RB for future versions.
    Make sure your library path is also pointed at RBuilder\Source instead of
    RBuilder\Lib, unless you need RAP in which case you need to also include
    RBuilder\Lib to bring in the RAP dcus. The RAP dcus don't need to be
    recompiled if you only modify the implementation section of the viewer code
    and not the interface section.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited April 2003
    Jim,
    Are you planning to release a version of RB that allows one to change this
    setting without us having to change the source code? We are using v6.03, but
    planning to upgrade to v7 fairly soon. For obvious reasons it is unwise to
    change the source of any product that one buys and requires external support
    on - as well as your points. Ideally one would wat to be able to pre-set
    that colour at design time, then be able to configure it from the report
    designer.
    regards,
    gilbert

  • edited April 2003
    Jim,
    Sorry, my mistake i was looking to change the colour on the ppReport or
    Designer component, not the viewer (which makes sense). By the way, did you
    know that you have a published property on your TppViewer component called
    "PageColor", so scrap my last reply.
    regards,
    gilbert



  • edited April 2003
    Sorry, my mistake. You can do this in this event:

    procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
    begin
    TppViewer(ppReport1.PreviewForm.Viewer).PageColor := clRed; {pick your
    color}
    end;


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.