canuckconsulting
asked on
SSRS show background behind table
We have a subreport which has many columns corresponding to product sizes as shown below:
Only the sizes relevant to the products being shown are displayed, all other columns are hidden. These results in he report looking like this:
We would like to extend the blue header row background across the page so the table looks better. We've tried adding a blue rectangle section behind that header row but of course SSRS just pushes it down the report. Is there a way to achieve what we want?
Only the sizes relevant to the products being shown are displayed, all other columns are hidden. These results in he report looking like this:
We would like to extend the blue header row background across the page so the table looks better. We've tried adding a blue rectangle section behind that header row but of course SSRS just pushes it down the report. Is there a way to achieve what we want?
Why don't you display all sizes and make the background of the cell with value a different colour. In fact you can make different colours depending on the stock level: ie: normal - green, low level - red. That way it will be more user friendly: the users will always intuitively know what part of the screen to look for a size 10, an the colour will tell them straight away what stock is low or missing altogether.
Hi,
Try below solution. You might have write some custom code to set visibility of the column based on the data available for the product size.
You can achieve the same that you want to do.
I took the example to demo you. I have five columns and same way based on the values i hided the column but at the same time i want tablix size to be mapped with the header.
I have five columns for data and also i have created other five columns. Set the visibility of those columns based on the data available for first five columns.
Let's if Column1 has black value and it's not visible at the same time make visibility of your first blank column to true. So it will always map with size of your header.
I have attached the report. Please go through.
If you wan to make data black just alter the query and set it make for any column.
Let's say if you want to make first column blank set it like.
Hope it will help you.
Dynamic-Columns.rdl
Try below solution. You might have write some custom code to set visibility of the column based on the data available for the product size.
You can achieve the same that you want to do.
I took the example to demo you. I have five columns and same way based on the values i hided the column but at the same time i want tablix size to be mapped with the header.
I have five columns for data and also i have created other five columns. Set the visibility of those columns based on the data available for first five columns.
Let's if Column1 has black value and it's not visible at the same time make visibility of your first blank column to true. So it will always map with size of your header.
I have attached the report. Please go through.
If you wan to make data black just alter the query and set it make for any column.
SELECT
'Col1' Column1
,'Col2' Column2
,'Col3' Column3
,'Col4' Column4
,'Col5' Column5
Let's say if you want to make first column blank set it like.
SELECT
'' Column1
,'Col2' Column2
,'Col3' Column3
,'Col4' Column4
,'Col5' Column5
Hope it will help you.
Dynamic-Columns.rdl
ASKER
Thanks to you both for the help.
I neglected to mention an important aspect of the report; their are 70 available sizes so displaying each column so they can both be read and printed on US Legal landscape is not possible.
chaau - That's why I'm hiding the columns, allowing the sizes to fit on the page. I can't display all the sizes.
Arif - Same situation where I can't display the "placeholder" columns you suggest. I simply don't have the space on the page.
I neglected to mention an important aspect of the report; their are 70 available sizes so displaying each column so they can both be read and printed on US Legal landscape is not possible.
chaau - That's why I'm hiding the columns, allowing the sizes to fit on the page. I can't display all the sizes.
Arif - Same situation where I can't display the "placeholder" columns you suggest. I simply don't have the space on the page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Arif thanks for the reply and sorry for the late response.
The problem is in your example you are always showing five columns which works great because you can show all five and they fit on the page. In my case I have possible 70 columns which will not fit on the page. For an order roughly a maximum of 20 are shown which do fit on the page.
So really I need the background to go across the page. I think I can use your approach though. I can have a number of blank buffer columns which i can display if there are less than 20 columns shown. It's a bit messy though. I was hoping there would have been something easier!
Thanks again for the help.
The problem is in your example you are always showing five columns which works great because you can show all five and they fit on the page. In my case I have possible 70 columns which will not fit on the page. For an order roughly a maximum of 20 are shown which do fit on the page.
So really I need the background to go across the page. I think I can use your approach though. I can have a number of blank buffer columns which i can display if there are less than 20 columns shown. It's a bit messy though. I was hoping there would have been something easier!
Thanks again for the help.