I have a range to be used in the first IF statement
assetnum between 85000 and 85999
assetnum between 88000 and 88900
and assetnum = 87500
if these above ranges occur then the 2nd IF statement
if(RS("Expense".value){
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), "na" + " "
would display "na".
if the above ranges does not occur then the statement
if(RS("Expense".value){
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), colAct) + " "
would display the actual value of the expense.
The code as mentioned below works fine for only one number. please help me with this nightmare. Thanks.
Actual code
if(RS("AssetNum".value != "87500"{
if(RS("Expense".value){
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), colAct) + " "
Response.Write(rightAlign(setDecimals(RS("PLExp".value.toString(), 0), colPlan) + " "
}else{
Response.Write(rightAlign("" + setDecimals(RS("ActUnits".value.toString(), 0), colAct) + " "
Response.Write(rightAlign("" + setDecimals(RS("PLUnits".value.toString(), 0), colPlan) + " "
}
}else{
if(RS("Expense".value) {
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), "na" + " "
Response.Write(rightAlign(setDecimals(RS("PLExp".value.toString(), 0), "na" + " "
}else{
Response.Write(rightAlign("" + setDecimals(RS("ActUnits".value.toString(), 0), "na" + " "
Response.Write(rightAlign("" + setDecimals(RS("PLUnits".value.toString(), 0), "na" + " "
}
}
assetnum between 85000 and 85999
assetnum between 88000 and 88900
and assetnum = 87500
if these above ranges occur then the 2nd IF statement
if(RS("Expense".value){
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), "na" + " "
would display "na".
if the above ranges does not occur then the statement
if(RS("Expense".value){
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), colAct) + " "
would display the actual value of the expense.
The code as mentioned below works fine for only one number. please help me with this nightmare. Thanks.
Actual code
if(RS("AssetNum".value != "87500"{
if(RS("Expense".value){
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), colAct) + " "
Response.Write(rightAlign(setDecimals(RS("PLExp".value.toString(), 0), colPlan) + " "
}else{
Response.Write(rightAlign("" + setDecimals(RS("ActUnits".value.toString(), 0), colAct) + " "
Response.Write(rightAlign("" + setDecimals(RS("PLUnits".value.toString(), 0), colPlan) + " "
}
}else{
if(RS("Expense".value) {
Response.Write(rightAlign(setDecimals(RS("ActExp".value.toString(), 0), "na" + " "
Response.Write(rightAlign(setDecimals(RS("PLExp".value.toString(), 0), "na" + " "
}else{
Response.Write(rightAlign("" + setDecimals(RS("ActUnits".value.toString(), 0), "na" + " "
Response.Write(rightAlign("" + setDecimals(RS("PLUnits".value.toString(), 0), "na" + " "
}
}