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.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Advanced report layout (SSRS 2003)

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 - Value
Oil – InitialStock – AZ – BR – 10
Oil – InitialStock – AZ – PZ – 13
Oil – InitialStock – AZ – SE – 16
Oil – InitialStock – AZ – SF – 10
Oil – InitialStock – AZ – TL – 10
Oil – InitialStock – BZ – BR – 9
Oil – InitialStock – BZ – PZ – 13
Oil – InitialStock – BZ – SE – 16
Oil – InitialStock – BZ – SF – 11
Oil – InitialStock – BZ – TL – 10
Oil – FinalStock – AZ – BR – 10
Oil – FinalStock – AZ – PZ – 13
Oil – FinalStock – AZ – SE – 16
Oil – FinalStock – AZ – SF – 18
Oil – FinalStock – AZ – TL – 13
Oil – FinalStock – BZ – BR – 10
Oil – FinalStock – BZ – PZ – 13
Oil – FinalStock – BZ – SE – 17
Oil – FinalStock – BZ – SF – 22
Oil – FinalStock – BZ – TL – 19


Now I have to make a report like this.

BR PZ SE SF TL TOTAL
OIL
INITIAL STOCK
AZ TotalRow
BZ
TOTAL TotalCol

AZ
BZ
TOTAL
FINAL STOCK
AZ
BZ
TOTAL


GASOLINE
INITIAL STOCK
AZ TotalRow
BZ
TOTAL TotalCol

AZ
BZ
TOTAL
FINAL STOCK
AZ
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 help
Anyways, looks like the below
you 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 MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

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 MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

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
Go to Top of Page

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 MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Ciupaz
Posting Yak Master

232 Posts

Posted - 2013-07-08 : 06:05:39
Maybe try this:

https://plus.google.com/photos/101479159686208245044/albums?banner=pwa&gpsrc=pwrd1#photos/101479159686208245044/albums/5898183567279184657/5898183566438148274?pid=5898183566438148274&oid=101479159686208245044

Go to Top of Page

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
Go to Top of Page
   

- Advertisement -