DBCalc null value error?
I'm not sure if this is an error or if I'm just not doing something right.
I am running RB 7.03. DBCalcs in my reports seem to reset whenever a null
value is encountered. For instance, if a null value is encountered halfway
through the report, the value of the DBCalc only represents the figures that
come after the null value was encountered. Is there something I'm doing
wrong or is this a real problem?
I am running RB 7.03. DBCalcs in my reports seem to reset whenever a null
value is encountered. For instance, if a null value is encountered halfway
through the report, the value of the DBCalc only represents the figures that
come after the null value was encountered. Is there something I'm doing
wrong or is this a real problem?
This discussion has been closed.
Comments
This is not the normal behavior of ReportBuilder. Which database are you
using? In my testing with Paradox, null values were seen as 0's and added
accordingly. Be sure you do not have a ResetGroup defined for your dbCalcs.
If possible, please send a small example of this behavior to
support@digital-metaphors.com in .zip format and I'll take a look at it for
you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Reset Group is not defined for the DBCalcs. The field that is being summed
in the DBCalcs is a calulated field in one of the datasets created by the RB
query designer. The claculated field sums a number of dollar amounts and
the dbcalc sums the many instances of this calculated field. I could use
variables but the DBCalcs are SO much easier to use!!!
Thank You,
Branden Johnson
Where are you placing these DBCalc components? Which database are you
using? I tested this with a Paradox database and everything seemed to work
correctly. You can take a look at the ReportBuilder source inside the
ppCtrls.pas file and see in the TppDBCalc.Compute routine that a DBCalc
component is only reset when it is assigned a reset group or if the
datapipeline is nil. I will need you to create a simple example of this
behavior in order to possibly debug the ReportBuilder code. Please create a
small stand-alone example using only native Delphi and ReportBuilder
components that demonstrates the problem and send it in .zip format to
support@digital-metaphors.com.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
dataset that this figure is being pulled from is linked to the main dataset
(all created in the RB query designer). I'm thinking that when there aren't
any records in the summing result set that correspond to the master dataset,
the datapipline becomes nil. This would reset the dbcalc correct?
There was an issue very similar to this one addressed for ReportBuilder
7.04. Please download the latest version and test with that. I believe
this should fix the issue you are having.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com