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

Display Format with own text?

edited July 2005 in General
Hello,

is it possible to use own text in Display Format?

For example I have a DBText with datatype string. I'd like to set a
Display Format for this DBText that allows to display the value like this:
"Your VAT-Number: "

Is it possible? What is the correct Display Format for this?

Best regards,
Dmitri

Comments

  • edited July 2005
    Hi Dmitri,

    ReportBuilder uses the Delphi function FormatMaskText to format it's text
    objects. I do not believe it is possible to perform the task you describe
    below using this function (see the FormatMaskText topic in the Delphi help).

    I would recommend replacing your DBText component with a TppLable or a
    string type TppVariable. Then, inside the DetailBand.OnBeforePrint event,
    update the value of that component manually.

    begin
    myLabel.Text := 'Your VAT-Number: ' + Report.DataPipeline['VATNumber'];
    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    If you need the format available to every template in the application rather
    than just one, you can add your own DisplayFormats to RB's existing ones
    quite easily.

    We have a unit named myDisplayFormats which overrides RB's standard
    gcDisplayFormat e.g. includes all the standard RB ones but we have added
    extra ones to it.

    It's so long ago that we added it that I can't remember exactly where it
    came from although I am sure RB can point you in the right direction.

    If you would like a copy of ours, I'd be happy to send you it.

    Regards,

    Pete Colson.




  • edited July 2005
    Hi Nico,

    I solved this problem with a string type TppVariable. I just was
    interessted on a possible solution with DisplayFormat, bur the solution
    with a string type TppVariable is ok too.

    Thanks a lot,
    Dmitri
  • edited July 2005
    Hello Peter,

    i would be pleased to get this unit from you.
    Please send me this unit to my e-mail-address.

    Thanks a lot,
    Dmitri
This discussion has been closed.