-
How to increase number field by percentage?
Hello, I need to increase a currency field by 30%
I have looked all over the place, and I haven't been able to find anything.
I would post the code I have, but I didn't think it would be relevant. Thanks for any info in advance.
-
How to increase number field by percentage? (reply)
Use the equation format in magiccell :- <<!field! * 1.03::###.##>>
FK
------------
Gene Burch at 4/16/01 10:41:39 AM
Hello, I need to increase a currency field by 30%
I have looked all over the place, and I haven't been able to find anything.
I would post the code I have, but I didn't think it would be relevant. Thanks for any info in advance.
-
How to increase number field by percentage? (reply)
I think that some code would be relevant now.
Sorry if it is sloppy, I have been playing around with snippet you gave me, and I haven't been able to get any reaction other than
"Error in # pairs in - $15.00"
and this comes when i don't have a coma after the Format=[Currency], but if I do add a coma, nothing happens. I've tried alot of variations, but I don't understand the proper usage.
Thanks again for any help, here is the code I have.
<%
W=Request("prodVar"
if (W <> "" then
Session("myprodVar" = W
end if
LOCALSQL = Session("myprodVar" + "%"
%>
<%
Response.Buffer=true
Set MyDb = Server.CreateObject("AspDB.Pro"
MyDb.dbUnit = 10053
if (W <> "" then MyDb.dbReset(10053)
MyDb.dbMDB=Server.MapPath("/XXX"
MyDb.dbDBType = "Access"
MyDb.dbMode="Grid"
Mydb.dbgridIndex=True
MyDb.dbGridTableTag="bordercolorlight=#000000 bordercolordark=#ffffff cellspacing=0 cellpadding=2 border=1 width=100%"
MYDb.dbOptions="CellFontTag=Face=Verdana Size=2;HeaderFontTag=Face=Verdana Size=2"
MyDb.dbColor="#009EED,#FFFFFF,#009EFD,#FFFFFF, #0080ED"
MyDb.dbNameMap = "ProdName,Product Name; UnitPrice,Price;"
MyDb.dbGridDisplayFlds="1,3"
MyDb.dbMagicCell = "prodname,,<b>#prodname#</b><br>#proddiz#;unitprice,align=right,format=[currency]<!unitprice! * 1.03::###.##>"
Mydb.dbGridInc=5
sq = "Select * FROM ccc WHERE ((CatID Like '"
sq = sq & LOCALSQL
sq = sq & "')"
MyDb.dbSQL = sq
Mydb.dbNavigation="Bottom"
Mydb.dbImageDir="/images/"
MyDb.dbNavigationItem="top,prev,next,bottom,gr idrow,filter,grid"
Mydb.dbNavigationIcon="std"
MyDb.AspDBPro 'Display it!
%>
------------
FRANK KWONG at 4/17/01 12:42:05 AM
Use the equation format in magiccell :- <<!field! * 1.03::###.##>>
FK
------------
Gene Burch at 4/16/01 10:41:39 AM
Hello, I need to increase a currency field by 30%
I have looked all over the place, and I haven't been able to find anything.
I would post the code I have, but I didn't think it would be relevant. Thanks for any info in advance.
-
How to increase number field by percentage? (reply)
<%
Set X= Server.CreateObject("ASP.DB"
X.dbUnit = "999"
X.dbMode = "Grid"
X.dbDSN = "DSN=NWIND"
X.dbMagicCell = "(;,[]#|~/+{})UnitPrice,,<<#UnitPrice# * 1.03 :: Currency>>"
X.dbSQL = "SELECT ProductID,ProductName,UnitPrice FROM Products"
X.ASPdb
%>
FK
------------
Gene Burch at 4/17/01 3:23:09 AM
I think that some code would be relevant now.
Sorry if it is sloppy, I have been playing around with snippet you gave me, and I haven't been able to get any reaction other than
"Error in # pairs in - $15.00"
and this comes when i don't have a coma after the Format=[Currency], but if I do add a coma, nothing happens. I've tried alot of variations, but I don't understand the proper usage.
Thanks again for any help, here is the code I have.
<%
W=Request("prodVar"
if (W <> "" then
Session("myprodVar" = W
end if
LOCALSQL = Session("myprodVar" + "%"
%>
<%
Response.Buffer=true
Set MyDb = Server.CreateObject("AspDB.Pro"
MyDb.dbUnit = 10053
if (W <> "" then MyDb.dbReset(10053)
MyDb.dbMDB=Server.MapPath("/XXX"
MyDb.dbDBType = "Access"
MyDb.dbMode="Grid"
Mydb.dbgridIndex=True
MyDb.dbGridTableTag="bordercolorlight=#000000 bordercolordark=#ffffff cellspacing=0 cellpadding=2 border=1 width=100%"
MYDb.dbOptions="CellFontTag=Face=Verdana Size=2;HeaderFontTag=Face=Verdana Size=2"
MyDb.dbColor="#009EED,#FFFFFF,#009EFD,#FFFFFF, #0080ED"
MyDb.dbNameMap = "ProdName,Product Name; UnitPrice,Price;"
MyDb.dbGridDisplayFlds="1,3"
MyDb.dbMagicCell = "prodname,,<b>#prodname#</b><br>#proddiz#;unitprice,align=right,format=[currency]<!unitprice! * 1.03::###.##>"
Mydb.dbGridInc=5
sq = "Select * FROM ccc WHERE ((CatID Like '"
sq = sq & LOCALSQL
sq = sq & "')"
MyDb.dbSQL = sq
Mydb.dbNavigation="Bottom"
Mydb.dbImageDir="/images/"
MyDb.dbNavigationItem="top,prev,next,bottom,gr idrow,filter,grid"
Mydb.dbNavigationIcon="std"
MyDb.AspDBPro 'Display it!
%>
------------
FRANK KWONG at 4/17/01 12:42:05 AM
Use the equation format in magiccell :- <<!field! * 1.03::###.##>>
FK
------------
Gene Burch at 4/16/01 10:41:39 AM
Hello, I need to increase a currency field by 30%
I have looked all over the place, and I haven't been able to find anything.
I would post the code I have, but I didn't think it would be relevant. Thanks for any info in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|