?
Solved

subtotal in datalist

Posted on 2004-08-11
2
Medium Priority
?
485 Views
Last Modified: 2010-10-05
Does anyone know how to implement subtotals in a datalist.

Like this

            2004

                        Boeing              1

                        Milgard              3

                                    total      4
            2003

                        Boeing              2

                        Where Every      7

                                    total      9
                     
            2002

                        Boeing              7

                        etc…                1

                                    total      8

 
0
Comment
Question by:vinny45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 1000 total points
ID: 11780349
I would suggest use SQL queries on the table. Like..  "SELECT SUM(Ammount) FROM SalaryTable GROUP BY Year"
-Baan
0
 
LVL 3

Assisted Solution

by:topless_stang
topless_stang earned 1000 total points
ID: 11783935
I agree with Baan.  Only further thought is to combine the summary with the detail records, like:
  SELECT 0 AS TotalRow, Year,Title, Amount FROM SalaryTable
  UNION
  SELECT 1 AS TotalRow, Year,'Total' AS Title, SUM(Amount) FROM SalaryTable GROUP BY Year
  ORDER BY Year, Total, Title

I like adding a column like TotalRow for both the ORDER BY and to do things like bold the row in the output.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question