HTML
  Home arrow HTML arrow Page 2 - Comparing Subtotals Using a 3D HTML Record...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Comparing Subtotals Using a 3D HTML Recordset
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-11-25

    Table of Contents:
  • Comparing Subtotals Using a 3D HTML Recordset
  • Example
  • Calculating Totals with a 3D Recordset
  • Code Explanation

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Comparing Subtotals Using a 3D HTML Recordset - Example


    (Page 2 of 4 )

    I will use a hypothetical example here. Imagine that you own a bookshop with three branches in three different states in the U.S.A. Each of the bookshops has a database. Each database has a table of products ordered. Let us consider the following three tables as the tables you have in the three branches. They are very simplified for clarity.


    ID

    Name

    Category

    Number

    Cost($)

    1

    BIC

    Pen

    75

    25

    2

    BEST

    Pen

    75

    25

    3

    Text Books

    Book

    40

    600

    4

    Novels

    Book

    40

    600

    5

    Exercise Bks

    Book

    20

    300


    ID

    Name

    Category

    Number

    Cost($)

    1

    BIC

    Pen

    105

    35

    2

    BEST

    Pen

    105

    35

    3

    Test Books

    Book

    50

    750

    4

    Novels

    Book

    50

    750

    5

    Exercise Bks

    Book

    25

    400


    ID

    Name

    Category

    Number

    Cost

    1

    BIC

    Pen

    110

    38

    2

    BEST

    Pen

    110

    38

    3

    Text Books

    Book

    45

    700

    4

    Novels

    Book

    45

    700

    5

    Exercise Bks

    Book

    45

    700


    For each of the above tables you can find the sum of the numbers ordered or costs for each category (pen, book). If you do that you will have the following subtotal tables respectively:


     

    Sub. T. No.

    Sub. T. Costs($)

    Pens

    150

    50

    Books

    100

    1500


     

    Sub. T. No.

    Sub. T. Costs($)

    Pens

    210

    70

    Books

    125

    1900


     

    Sub. T. No.

    Sub. T. Costs($)

    Pens

    220

    76

    Books

    135

    2100

    You may want to know the overall totals; that is the total number of pens you have ordered in all of your branches, the total number of books you have ordered in all of your branches, the total costs of pens in all of your branches and the total costs of books in all of your branches. Would it not be nice if you have the above subtotal tables in a 3D recordset, the first one in the first vertical pane, the next one in the next vertical pane and the third one in the third vertical plane? Then you can add by looking at a line of cells through the vertical planes.

    You can do this conveniently with subtotals. However, a 3D recordset is not a direct solution to comparing cells or rows between ordinary tables. This is because the number of rows between ordinary tables will hardly be the same.

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT