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

accessing db text calculations...

edited March 2004 in RAP
Hello,

I am using RB 6.03.

When adding a dbtext component in the report designer I can right click on
the component, choose calculation and enter a calculation (such as
pl1['age'] + pl1['height'] or (dbcalc1.value - dbcalc2.value)/dbcalc1.value.

What I need to do is generate a dbText component on the fly and enter the
above calculation from a text file. Therefore, I would read pl1['age'] +
pl1['height'] as text from a text file, populate a property of the dbText
component with this text then run my report. Rap would then evaluate my
text and generate the report. Hard coding the OnPrint event isn't good
enough because this text would change on the fly and I would never be able
to anticipate what text was coming in.

My question is what property of the dbText component would I need to
populate with this text and is there anything else I would need to do to get
this to work?

Thanks..

..Joe..

Comments

  • edited March 2004

    Check out RBuilder\Demos\Rap\Main\Rap.dpr

    Demos 41 and 42 show how to dynamically create RAP event-handler code (see
    rap0041.pas and rap0042.pas).



    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

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