andrico
Posts: 12
|
Posted: 02/20/2004, 4:25 AM |
|
I have a grid that displays Agent's customer info based on session variables. It works perfectly. The only problem I'm have is getting the label 'Total' to display the correct info. 'Total' doesn't exist in the 'Table'. It was added to the grid to display the sum of 'monthly_renewal' + 'reconnect_fee' -'Credit' (all are hidden fields in the grid). Now my code works perfectly in Before Show if I use just 'fldTotal = fldmonthly_renewal - fldCredit. But when I add 'fldreconnect_fee' to the equation, I get a 'Type Mismatch' error. All the fields are 'money' in the SQL Table and 'Number' in the grid. Is there a better way to do this? Thanks in advance for your help.
_________________
Rico |
|
|
Don Safar
|
Posted: 02/20/2004, 6:20 AM |
|
If it is a row level calculation, you should be using the beforeshowrow
event (not beforeshow) to perform the math. You could also opt to do the
calculation in the sql and pass it as a field to the grid.
"andrico" <andrico@forum.codecharge> wrote in message
news:64035fcbd15beb@news.codecharge.com...
> I have a grid that displays Agent's customer info based on session
variables. It works perfectly. The only problem I'm have is getting the
label 'Total' to display the correct info. 'Total' doesn't exist in the
'Table'. It was added to the grid to display the sum of 'monthly_renewal' +
'reconnect_fee' -'Credit' (all are hidden fields in the grid). Now my code
works perfectly in Before Show if I use just 'fldTotal =
fldmonthly_renewal - fldCredit. But when I add 'fldreconnect_fee' to the
equation, I get a 'Type Mismatch' error. All the fields are 'money' in the
SQL Table and 'Number' in the grid. Is there a better way to do this? Thanks
in advance for your help.
> _________________
> Rico
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
andrico
Posts: 12
|
Posted: 02/21/2004, 7:45 AM |
|
Thanks...got it to work!
_________________
Rico |
|
|
|