Calculated Fields on a dataview
I have a custom dataview with say 10 tables total. The dataview is
inherited from TdaBDEQueryTemplateDataView. I use the routine
AddAllSelectFields to add the fields to the report. I want to add a
calculated field that has its values calculated based on a couple of
other fields in the file. I know how to do this from the calc tab
inside the report writer and adding code to a variable oncalc event.
However, this would be harder for the end user. I would prefer that
in the list of fields for the table, I could add a calculated field to
this somehow and have the code to calculate the value in the
dataview. Is there a way to do this? Thanks!
inherited from TdaBDEQueryTemplateDataView. I use the routine
AddAllSelectFields to add the fields to the report. I want to add a
calculated field that has its values calculated based on a couple of
other fields in the file. I know how to do this from the calc tab
inside the report writer and adding code to a variable oncalc event.
However, this would be harder for the end user. I would prefer that
in the list of fields for the table, I could add a calculated field to
this somehow and have the code to calculate the value in the
dataview. Is there a way to do this? Thanks!
This discussion has been closed.
Comments
field. Here is an example of extracting the TdaSQL object from a dataview
and creating different kinds of fields on it. It was created in RB 7 and D6.
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com