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

Easy one: uppercase

edited December 2003 in General
Hello!

How can I force ppDBText objects to always get displayed in uppercase no
matter what is written in the DB ?

Thanks

Comments

  • edited December 2003
    Hi Steve,

    Instead of using a DBText component, try using a Variable and in the OnCalc
    event pull the data directly off the datapipeline calling UpperCase() on
    that data.

    procedure TForm1.Variable1Calc(Sender: TObject; var Value: Variant);
    begin
    Value := UpperCase(Report.DataPipeline['MyField']);
    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    Thanks for the fast answer.

    I "could" use the variable object but I already have a whole report built
    with ppDBText components. Also, since this report will be accessed by end
    users I want it to be as easy to handle than possible.

    Any hint ?



  • edited December 2003
    Hi Steve,

    The only other thing I can think to try would be to create a report object
    loop and for each DBText you have in your report, change its value to
    uppercase. Check out the tech-tips newsgroup in the Code Based section for
    an article on looping through all objects in a report.

    --
    Best Regards,

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