CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Multiply Fields using * operator as Custom Code

Print topic Send  topic

Author Message
WaveRebel
Posted: 10/24/2002, 6:01 AM

Hi, (using ASP)
Im working on a Backoffice and i need to add some custom code to a Label in the Grid.
I dont know what to use in the custom code section.
Here's what i have.

----------------------------------------
dim producttotal
producttotal = ordprod_qty * prod_price
----------------------------------------

This code will give me the total $ of products. But as custom code has its own ASP page it doenst contain the connection string neither the sql string. Im only asking if you guys know a way of using CCS code instead of making my own connection and my own sql string.

Thanks
WaveRebel
Posted: 10/24/2002, 11:04 AM

Well after a few hours trying to find out how it works i actually founf out how to do it.

Before Show Code

'Custom Code @
' -------------------------

OrderProducts.producttotal.Value = OrderProducts.Recordset.Fields("ordprod_qty") * OrderProducts.Recordset.Fields("prod_price")

' -------------------------
'End Custom Code


Here are the main vars:
OrderProducts = Form or Grid Name
ordprod_qty = Quantity of products on Database
prod_price = Price of the product


Easy! This will multiply the amount of products in your basket by the price and give you a total in the label <producttotal> :D

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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