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

Re: Report builder shrink routine

edited November 2003 in General
Hello.

Hypothetically speaking, Let's say that I created a report that
PageOriented := Landscape
PageSize := Legal
PageWidth := 14
PageHeight 8.5

Does Report Builder have a routine to shrink the report to
PageSize:=Letter
and WidthxHeight := 8.5 X 11

I know that some printers have routine similiar to that functionality but
for those that do not is why I would like to found out whether report
builder has some function like that?

Thanks,
Tim Armtrong

Comments

  • edited November 2003
    Hi Tim,

    Sorry, there is no built in way to automatically shrink a report in
    ReportBuilder. One option would be to create a report object loop and move
    each report component within the Letter page size boundaries. For an
    example of creating an object loop, see the article below.

    ----------------------------------------------
    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;


    --
    Best Regards,

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