Home Devices

stretch & skew

edited January 2005 in Devices
Hi
Using Delphi 6, ReportBuilder
My program creates its reports at runtime. User can select any number of
fields from a list and then clicks on "create" button, my program
creates needed pplabels and ppDBTexts in a A4 report and shows report
designer to user. Now User can change any item in the report, including
"Page Width and Height". but by increasing page width user have to
increase width of all labels and dbtexts.
- is there any way to stretch & skew page width with all labels and
dbtexts?
- how can i do this programatically?
regards

Comments

  • edited January 2005

    You will need to write some code to iterate through the report elements and
    adjust there size.

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

    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.