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

Text Vs Memo

edited March 2003 in General
Hello,
I am using reportbuilder 5.56 embedded in an application and I have a
formatting problem :

I have two text fields called UNIT and VALUE when their total size is about
3cm the problem I that sometimes it is UNIT that is about 2cm and VALUE
about 1cm, sometimes the opposite. Until now I have they have used DBMemo
with a fixed column size, but this is no longer good enough so I now use
DBText with the property AutoSize, this works well for the first but I can't
get 2nd text to shift relative to the first and so the texts overlap. I am
sure this is possible but can't see how.

thanks

Alex

Data e.g..

UNIT = 108550 VALUE = "FH"
UNIT = 1 VALUE="DAILY CTR"

Comments

  • edited March 2003
    Alex,

    Use a variable or a label to concatinate the strings from the pipelines in
    an event handler. The event is going to either be the Variable.OnCalc or
    the Label.OnPrint event. Below is an example of code that will perform this
    task.

    procedure TrapMain.ppVariable1Calc(Sender: TObject; var Value: Variant);
    begin
    Value := plClient['FIRST_NAME'] + ' ' + plClient['LAST_NAME'];
    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2003

  • edited March 2003
    No this can't be used to solve my problem as I don't have access to the
    source code or even RAP.
    I just have the pipelines which I can call and the visual components to
    create the report.
    Any other suggestions ?
    thanks
    Alex


    "Nico Cizik (Digital Metaphors)" a ?crit dans
  • edited March 2003
    In the dbRichText I don't have the merge property, I tried with this
    component but it is like a DBmemo in that have to use a fixed width.

    For the RBAddon I don't have this component at all, it may not be in the
    version that I am using (5.56) ?

    Any other ideas ?

    thanxs
    Alex


  • edited March 2003
    Alex,

    Sorry about the procedure name, that was a little confusing. This can be
    done in delphi as well during runtime in the Variable.OnCalc event.
    Something like this...

    procedure TForm1.ppVariable1Calc(Sender: TObject; var Value: Variant);
    begin
    Value := Pipeline['UNIT'] + ' ' + Pipeline['VALUE'];
    end;

    If you do not have Delphi installed and you are an end-user, try using the
    TppRichText Component and set it's MailMerge to true, then enter the two
    fields into the rich editor. For more help, check out the help file on
    MailMerge support. Otherwise, contact you application provider and see if
    they can provide support for this feature either by providing a calculated
    field on the dataset or providing RAP in the designer.

    --
    Best Regards,

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