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

help on creating a custom DBText component

edited October 2009 in Component Writing
Hi!

I would like to have a custom component that let the user to make a
calculation on actual DBText or DBCalc value.
Calculation can be a Percent, Sum, Divisiom, etc...

For example, if DBText value is "100", and selected calculation is 20%,
result value will be "20".

Is there any similar component to start with?

Thanks!

--
Santy C

Comments

  • edited October 2009
    Hi Santy,

    Take a look at the current TppDBText and TppDBCalc classes located in the
    ppCtrls.pas file for a starting point. From your description below, this
    will be a component very similar to the DTText component with simple
    calculations added on. Although the DBCalc component does perform similar
    calculations, it is designed to accumulate values from the entire dataset
    and give a value based on them.

    Also, take a look at the demo located in the \Demos\RCL\... directory. This
    shows how to create and add a custom component to ReportBuilder.

    --
    Regards,

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

    Best Regards,

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