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

Printing to several paper sizes

edited January 2006 in General
Hi,

I need my report to be printed correct both to A4 and to Letter paper size.
Default is A4.
Everything is fine with portraits but I have problem with landscapes, where
the last columns disappear.

Is there any way the report to be stretched or something like that ?


Thanks.

Comments

  • edited January 2006
    Hi,

    If you are using ReportBuilder 9 or above, you can use the Anchors feature
    of each component to be sure they shift according to the page size. This
    feature will only shift components however, there is no built in way to
    stretch an entire report page to fit a different page size. It may be
    possible to manually reposition your report components with a report object
    loop before it is loaded depending on what paper size you are using.

    ----------------------------------------------
    Tech Tip: Loop Thru All Objects in a Report
    ---------------------------------------------

    A ReportBuilder report is composed of a set
    of components. The basic structure is

    Reports.Bands[].Objects[]

    The bands and objects within the report can
    be accessed directly by object name or
    via the Bands and Objects array properties.

    Below is an example of using the Bands and
    Objects array properties to change the font for
    all objects on a report.


    uses
    ppClass;


    procedure AssignFontToReport(aFont: TFont; aReport: TppCustomReport);
    var
    liBand: Integer;
    liObject: Integer;
    lObject: TppComponent;

    begin

    for liBand := 0 to aReport.BandCount-1 do

    for liObject := 0 to aReport.Bands[liBand].ObjectCount-1 do
    begin
    lObject := aReport.Bands[liBand].Objects[liObject];

    if lObject.HasFont then
    lObject.Font := aFont;

    end;

    end;


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.