Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Ciupaz
Posting Yak Master
232 Posts |
Posted - 2013-07-08 : 04:59:06
|
Hello all,using SQL Server 2008 but only Visual Studio 2003 to create the report, I have to create a table (or matrix) based on a resultset like this (stock of fuels):DescFuel – Stock – TypeFuel – Plant - Value……Here some values:DescFuel – Stock – TypeFuel – Plant - ValueOil – InitialStock – AZ – BR – 10Oil – InitialStock – AZ – PZ – 13Oil – InitialStock – AZ – SE – 16Oil – InitialStock – AZ – SF – 10Oil – InitialStock – AZ – TL – 10Oil – InitialStock – BZ – BR – 9Oil – InitialStock – BZ – PZ – 13Oil – InitialStock – BZ – SE – 16Oil – InitialStock – BZ – SF – 11Oil – InitialStock – BZ – TL – 10Oil – FinalStock – AZ – BR – 10Oil – FinalStock – AZ – PZ – 13Oil – FinalStock – AZ – SE – 16Oil – FinalStock – AZ – SF – 18Oil – FinalStock – AZ – TL – 13Oil – FinalStock – BZ – BR – 10Oil – FinalStock – BZ – PZ – 13Oil – FinalStock – BZ – SE – 17Oil – FinalStock – BZ – SF – 22Oil – FinalStock – BZ – TL – 19…Now I have to make a report like this. BR PZ SE SF TL TOTAL OIL INITIAL STOCKAZ TotalRowBZ TOTAL TotalCol AZ BZ TOTAL FINAL STOCKAZ BZ TOTAL GASOLINE INITIAL STOCKAZ TotalRowBZ TOTAL TotalCol AZ BZ TOTAL FINAL STOCKAZ BZ TOTAL In each column I have the plants, plus a last colum for the total of rows.For example, the first total (the red in the right upper corner) is: (AZ:BR) + (AZ:PZ) + (AZ:SE) + (AZ:SF) + (AZ:TL).Then I have rows for FuelType (AZ,BZ,GS in this example), and the report has 2 header inside: one for DescFuel (Oil and Gasoline in this case), and another header for stocks (InitialStock e FinalStock).Inside them the are total rows that sum TypeFuel foreach plant, foreach Stock and foreach DescOil.For example the first TotalCol is: (AZ:BR) + (BZ:BR)I know that is very complicated, but can anyone give me a step by step help on how to make a table (or matrix) that create this report?Thanks very much in advance. Luis |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-08 : 05:04:16
|
Not fully clear on layout as its difficult to follow from your post. If you could post a screenshot in some shared server and share the link, that would helpAnyways, looks like the belowyou need to use a matrix container with the column group on Plant field and row groups on DescFuel,Stock and TypeFuel on different levels.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-08 : 05:12:26
|
Also one more small thing. There's no version called SSRS 2003. SSRS has only versions 2000,2005 and 2008 as it ships as a component along with SQL Server installation.I think 2003 is just edition of Visual Studio IDE------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
Ciupaz
Posting Yak Master
232 Posts |
Posted - 2013-07-08 : 05:21:29
|
Yes, SQL Server 2000 and Visual Studio 2003 to create the report. In which server can I upload an image of the desidered report? L |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-08 : 05:23:14
|
Any shared server. And just post link here------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
Ciupaz
Posting Yak Master
232 Posts |
|
Ciupaz
Posting Yak Master
232 Posts |
Posted - 2013-07-08 : 09:42:04
|
In the Matrix is it possible to add a right column with the total values for each row? L |
|
|
|
|
|
|
|