DBCalc component Count Property Question
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.
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.
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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.
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com