Create table with sub-totals?

Results 1 to 2 of 2

Thread: Create table with sub-totals?

  1. #1
    Join Date
    Dec 1969

    Default Create table with sub-totals?

    Hello there. I am trying to create a table that has sub-totals. I am using RAC to create my table and here&#039;s my problem. I need to have sub-totals for each Chain - the table looks as follows:<BR><BR>Chain / Avg time / Total time<BR>Griffin / 10 / 100<BR>Jubitz / 50 / 200<BR>Sub-Total: / 60 / 300<BR><BR>Chain / Avg time / Total time<BR>Rip / 45 / 150<BR>Travel / 12 / 30<BR>Sub-Total: / 57 / 180<BR>TOTALS / 117 / 480<BR><BR>I was thinking I need a "For Each" loop or something to scroll through each Chain to get the sub-totals, but I don&#039;t know how to do that. I am able to get the Total, but need to use some kind of ASP to get the sub-totals. I hope this is making sense. My SQL statement is a basic one, but I don&#039;t know how to loop thru the records to create seperate sections in my table for each sub-total. Any ideas would be greatly appreicated! TIA!<BR><BR>Rebekah

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, General

    The link to the ASPFAQs is at the top right corner of most every page on this site, including the one you are reading now.<BR><BR>fifth FAQ from the top in the given category.<BR><BR>It doesn&#039;t specifically address subtotals, so ask if you don&#039;t see how to extend it to that. (Hint: You&#039;ll have to output the last subtotal *after* the end of the loop, so you might want to make the subtotal output code into a function/sub.)<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts