phpfreak
Posts: 3
|
| Posted: 04/29/2007, 9:10 AM |
|
Hi all,
I have a situation where I have to produce a web report in the horizontal direction. For example, generally we produce a report in the format:
Field1 Field2 Field3 Field4 .....
2001 2 3 4
2002 1 6 2
...
-----------------------------------------------
Sum 3 9 6
But my requirement is:
Fields Field1 Field1 Field1 Sum
Fields 2001 2002 2003 ....
Field2 2 1 ... x
Field3 3 6 ... x
Field4 4 2 ... x
...
Is such a report with Groups possible to generate in CCS?
Thanks a lot for any suggestion.
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 04/29/2007, 4:42 PM |
|
phpfreak
It is possible but you may have to be creative with your query. What database are you using??
|
 |
 |
phpfreak
Posts: 3
|
| Posted: 04/30/2007, 1:47 AM |
|
mambobrown.
I am using mysql 5.0. and php 5, apache 2 on Win32.
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 04/30/2007, 4:17 PM |
|
phpfreak
What it appears that you need is a Crosstab query. Here are some links that may be of help to you: http://dev.mysql.com/tech-resources/articles/wizard/page6.html http://rpbouman.blogspot.com/2005/10/creating-crosstabs-in-mysql.html
Hopefully this will help you.
|
 |
 |
|