CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Calculate Hidden Fields

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.