multiple groupings of companies within asp.net report

Discussion in 'ASP .Net Datagrid Control' started by karlid@yahoo.com, Jul 26, 2005.

  1. Guest

    Hi all,

    The DataGrid (or reader) sure makes life easier for the vast majority
    of sql query display jobs but I've come across something that is almost
    making me wish for the old classic asp days. I'm not ready to start
    coding in the aspx page like a class asp'er yet so i'm hoping someone
    has some advice for me.

    My problem is that I need to show a report with the following pattern.
    The sql is easy but how to make it display nicely in a single (or
    variable number) datagrid control has me scratching my head.

    The desired result looks like this:

    Company A
    user x 20
    user y 30
    user z 10
    -----------------
    60

    Company B
    user c 14
    user d 5
    user e 23
    user f 100
    -----------------
    142

    Company C
    user k 1
    user l 39
    user w 30
    -----------------
    70


    So... displaying a single company in a datagrid would be easy but how
    do i display all three in a single datagrid with them grouped by
    company? There are a variable number of companies.

    The sql result I have looks something like this:

    Company A user x 20
    Company A user y 30
    Company A user z 10
    Company B user c 14
    Company B user d 5
    Company B user e 23
    Company B user f 99
    Company C User k 1
    Company C user l 39
    Company C user w 30

    Any help is much appreciated.
     
    , Jul 26, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2lyZQ==?=
    Replies:
    12
    Views:
    534
    clintonG
    Sep 15, 2004
  2. =?Utf-8?B?QmlsbCBCb3Jn?=

    Best practice for multiple "companies" in one database/site

    =?Utf-8?B?QmlsbCBCb3Jn?=, Oct 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    608
    Karl Seguin
    Oct 19, 2004
  3. Paddy McCarthy

    [PROTHON] Subject groupings

    Paddy McCarthy, Apr 22, 2004, in forum: Python
    Replies:
    0
    Views:
    281
    Paddy McCarthy
    Apr 22, 2004
  4. Randy Smith
    Replies:
    6
    Views:
    566
    darrel
    May 1, 2007
  5. Mark Fitzpatrick
    Replies:
    7
    Views:
    325
    uybelgigaq
    Nov 23, 2007
Loading...

Share This Page