Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Repeat region - calculation (ASP)

Guest
Jul 19, 2011 Jul 19, 2011

hi all, i need help from you all

i have a problem as like...

i create db_ewallet (debit,credit,userid)

#########################

#  userid   #  debit  #  credit  #

#-------------#------------#------------#

# John     #   $20    #   $5     #

# John     #   $12   #            #

# Ray      #   $22   #    $12   #

# Lynda   #   $28   #    $3    #

#             #           #            #

#########################

i create table and make repeat region (user id is unique id)

the problem is i cant make a calculation total of debit because John (same people)

the command like this :to calculate debit

<%=(debit.Fields.Item("john").Value) + (debit.Fields.Item("Ray").Value)+ (debit.Fields.Item("lynda").Value)%>

the result appear = $70, the result should be like this : $82

TOPICS
Server side applications
316
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2011 Jul 19, 2011
LATEST

Simple. In your loop that outputs the recordset, maintain two variables that accumulate the debt and credit values.

I'm confused with your code though. Do you actually have database columns named 'Ray' , etc?

If you need more help, then you need to supply more info; database design, ASP code, etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines