Building transparent stacked column charts using MS SQL Server Reporting Services 2008
MS SQL Server 2008 Reporting Services has progressed the charts user controls as well as adding new graphical controls for use of report developers.
For example, you can easily build reports with stacked column charts which has transparent series data.
In the previous version of SQL Server Reporting Services 2005 (SSRS), I had tried to build such a stacked chart report which has a series data which I want to display it on the report as transparent.
But that time, I failed to build it using SQL Server 2005 Reporting Services Business Intelligence Development Studio (BIDS).
But SQL2008 BI Development Studio is powerful enough to manage this kind of a user report.
My sample data for the report is obtained by using the following sql query
select 1 as id, 2 as Blank, 10 as A, 5 as B, 3 as C
union all
select 2 as id, 4 as Blank, 5 as A, 7 as B, 4 as C
union all
select 3 as id, 3 as Blank, 6 as A, 6 as B, 5 as C
Then insert a Stacked Column Chart on the design surface of the sample SSRS report.
Then I dropped the ID field as the category field onto the chart.
I also selected the other fields and dropped them onto the data fields section as:
[Sum(Blank)], [Sum(A)], [Sum(B)] and [Sum(C)]
I selected the Blank field first since I want it to be close to the X-axis and transparent.
Click the properties context menu on the series you want to set as transparent.
On the Series Properties select the Fill the tab. Select the fill style as Solid and fill it with "No Color" which enables us using a transparent bar series.
You can also add a label on the series indicating the values of the data by selecting the "Show Data Labels" on the context menu on series.
If you have a design time problem on displaying data labels like me as you will see on the below screenshot, you can also add the data labels on the code side of the .rdl files.
All you have to do is adding the,
<UseValueAsLabel>true</UseValueAsLabel>
<Visible>true</Visible>
between the <ChartDataLabel> tags of the related series data.
The final stacked column chart will show off itself as follows