K
karlid
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.
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.