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

language support: French and Spanish

edited August 2005 in General
We are using Delphi 7, dbisam databases and reportbuilder reports to create
our software. We would like to add language support for French and Spanish.
Any recommendations on components to look at/try? Are there any components
that not only translate, but also resize fonts, etc. in order to get the
text to fit on the screen? Or is that something we need to do manually? We
have quite a few reporting areas, so manually resizing would take some time.

Any components that do not work well with report builder? Take care.

Thank you for your time,
Amber

Comments

  • edited August 2005
    Hi Amber,

    Although we are not experienced with the translation applications currently
    out there (perhaps another customer will chime in with their advise) it
    should be rather easy to incorporate one into your existing app using a
    report object loop.

    Before you print your report, or after you load it if you are using
    templates, you would simple loop through each report component sending the
    text property of each text component through your translation app. See the
    article below on looping through all components in a report.

    ----------------------------------------------
    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
  • edited August 2005
    That sounds good. Thank you for the reply.

    Amber


This discussion has been closed.