Solved

SSRS Columns as Rows in a Table

Posted on 2016-09-23
14
34 Views
Last Modified: 2016-09-26
Hello Experts Exchange
I have a SQL Server Reporting Services report that has a dataset with several columns, I want these columns going down as rows on the left hand side in a table, and my data from the columns going across by date.

My Columns are called;
TA_Date
TA_Notes_50
TA_Notes_20
TA_Notes_10

What are the steps required to do this?

Regards

SQLSearcher
0
Comment
Question by:SQLSearcher
  • 8
  • 6
14 Comments
 
LVL 12

Expert Comment

by:Arifhusen Ansari
Comment Utility
It's seems that you want to unpivot the data.

Like convert column to row.

If this is the case you can use the concept of pivot and unpivot in sql server it self.

It would be great if you post some example data and the expected output.
0
 

Author Comment

by:SQLSearcher
Comment Utility
Hello
I have attached a sample of data.

The data is not in SQL Server it's in Oracle.

Regards

SQLSearcher
Sample_Data.xls
0
 
LVL 12

Expert Comment

by:Arifhusen Ansari
Comment Utility
What is the expected output?
0
 

Author Comment

by:SQLSearcher
Comment Utility
Hi
Please find sample data with wanted output.

Regards

SQLSearcher
Sample_Data.xls
0
 
LVL 12

Accepted Solution

by:
Arifhusen Ansari earned 500 total points
Comment Utility
Ok.

I have attached the rdl file with the same solution.

I am trying to explain you in  brief.

I have used the matrix in the report.

I column group i have used the TA_Date field from the data.
Refer the screenshot.

2016-09-23_16-31-04.png
And in the data part of the martix i have used the list control.
Delete the row group from the list and add three row in it.
This list will in the data part of matrix.

In those three rows in list select the filed from the data as per your req.

Refer the screen shot

2016-09-23_16-33-25.png

In the row part again add the list.

2016-09-23_16-35-13.png
and remove the group from the list and add name hard coded.

Refer the screenshot.

2016-09-23_16-35-34.png
i have attached the rdl. Please check.


Final output

Final-Output.pngcolumntorow.rdl
0
 

Author Comment

by:SQLSearcher
Comment Utility
Hello Arif
Can you zip up the rdl file and attached so I can download it please?

Regards

SQLSearcher
0
 
LVL 12

Expert Comment

by:Arifhusen Ansari
Comment Utility
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:SQLSearcher
Comment Utility
Hello Arif
Can you in Visual studio open the rdl file and do this please?
solution > properties > TargetServerVersion set to SQL Server 2008 R2.

I'm getting an error when I try to  open the rdl file. Similar to this;
http://stackoverflow.com/questions/35922626/error-while-uploading-a-report

I'm using Visual studio 2013.

Regards

SQLSearcher
0
 
LVL 12

Expert Comment

by:Arifhusen Ansari
Comment Utility
Even if i change this i will not have any impact.

I need to create the report in same version and lower version.
0
 

Author Comment

by:SQLSearcher
Comment Utility
OK, I'm currently installing Visual Studio 2015 on my machine.
0
 

Author Comment

by:SQLSearcher
Comment Utility
Hello Arif
I have been able to get it running but I can not work out what you have done.

I have the date in the Columns field and inserted a list in the data field, but I can not insert a new row into the list.

How do I do that?

Regards

SQLSearcher
0
 

Author Comment

by:SQLSearcher
Comment Utility
Hello Arif
I have worked out how to create the matrix, is there a way to add a total column on the far right of the table?

Regards

SQLSearcher
0
 

Author Comment

by:SQLSearcher
Comment Utility
Hello Arif
I worked out the Total to.

Thank you for your help, you have been great.

Regards

SQLSearcher
0
 
LVL 12

Expert Comment

by:Arifhusen Ansari
Comment Utility
Thanks for your feedback.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now