This topic is locked

Totals in List page display ZERO (0)

8/29/2005 3:19:46 PM
ASPRunnerPro General questions
R
razvan author

When setting up "TOTAL" calculations in the List page for numeric fields from an Oracle database, it displays: Total: 0.

I tried setting it up as a number, but it just adds the two decimal points - Total: 0.00.

The fields in Oracle are DataType=Number, Size=38 and Scale=0, accepting Nulls (but even if I fill out all the Null values with zeroes, it still totals to Zero.)

Sergey Kornilov admin 8/30/2005

Hi,
thank you for pointing me to this issue. I'll fix it in the next update of ASPRunner.
You can use this workaround now:

  • open generated ..._list.asp file by any text editor.
  • find this line:
    if IsNumeric(rs("YourField")) then tYourField = tYourField + rs("YourField")


and replace it with this one:

if IsNumeric(trim(rs("YourField"))) then tYourField = tYourField + trim(rs("YourField"))

R
razvan author 8/30/2005

Sergey,
thank you for finding the solution for this issue so fast. It worked like a charm, as most of your quick solutions or workarounds.

I have changede the template file itself: file - line 870: > if IsNumeric(trim(rs("##FIELD##"))) then t##GOODFIELDNAME## = t##GOODFIELDNAME## + trim(rs("##FIELD##"))



Now it will generate the correct code everytime I (re)build any project which is easier than manually editing the code for every project...

Regards,

Razvan.