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

DBCalc component Count Property Question

edited September 2005 in General
In the RAP portion of the report writer, I wrote a delphi routine that I
call from the report writer to check if all of the DBText numeric fields
are zero on a line. If they are, I am setting the Detail band to
visible so that it will not show up on the report. In the summary
section, I have a DBCalc variable that calculates the number of records
printed. However, as I figured, this will not be correct since it
counts the invisible lines as well as the visible ones. I can get
around the problem by putting a variable on the form and calculating the
count myself, however I have about 20-30 reports I need to do this to.
I was wondering if there is a way to write a component or something so
that I would only need to put a component on there? Thanks for your help.

Comments

  • edited September 2005
    I forgot to mention I am using version 7.02 of the report writer.

  • edited September 2005
    Hi Jeff,

    It is possible to create and register custom components in ReportBuilder.
    In this case you would probably just need to create a component almost
    identical to the DBCalc component only design it to skip invisible detail
    lines. Take a look at the demo located in the \RBuilder\Demos\6. RCL\...
    directory. This gives an example of creating and registering a custom
    component with ReportBuilder.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2005
    I thought I would have to do that, I started on it, but was not sure
    where to get the detail band property in the new component in order to
    get it to skip. The band property that was there was for the band that
    the object was placed in.

  • edited September 2005
    Hi Jeff,

    If you have access to the report, you can use the TppReport.DetailBand
    property to access the detail band.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2005
    That worked great, thanks!

This discussion has been closed.