Dynamic Page Header/Footer width in SSRS - reporting-services

How is it possible to control the width of the page header and page footer (dynamically) based on the detail record in ssrs.
I am using a matrix in my detail section. Here, more month names can be added based on data. The width of header should be of same length of matrix width from detail section.
Thanks

Does it have to be the page header? If you make it the table header it will size with the matrix and you can have table headers repeat across pages which should achieve the same effect.

Now this answer isnt the cleanest but you could create 2 different size headers that are on top of each other. Then in the Header properties; use an expression in the "Hidden" property like so:
First Header
=iif(Parameters!YourParameter.Value < 3,TRUE,FALSE)
Second Header
=iif(Parameters!YourParameter.Value >= 3,TRUE,FALSE)
Now the 1st Header will be hidden when the value is less than 3 and the 2nd header will be hidden when the value is greater than or equal to 3.

Related

SSRS 2008 adjacent group row height not same as the other adjacent group's

i'm doing some work on SSRS report that require adjacent group.
The problem is the row height of above adjacent group appears bigger than the the other group below it.
Both row height are 0.14pt.
There is no cell in both row that has row height bigger than 0.14pt.
this is in design page:
and this is in web page:
as you can see the difference in row height.
i would like the row height to be the same for both group.
how do i do that. please help
thanks!
EDIT
here is hierarchy of row group for this table/matrix
and here is some illustration of how the table is arranged in html.
the blue cell is in same <tr> and yellow is in another <tr>
(you can manage to picture the html code i believe)
Set the Can grow Property to False.. and ensure the column width is wide enough to accommodate expected values in the box.. and ensure consume container white space is set to true on the report properties..
Select the group row in design and go to properties (left side pan)
Under General option there is property as CanGrow, set it to False.

SSRS - Dynamically shrink header

I need to shrink dynamically height of header on ssrs
I have found answer on: How to dynamically increase the page Header height in SSRS 2008 , but still I have problems as follows.
I have SSRS with several text boxes, (10 lines), and I want to show only one line for page 2 and after, and for page 1 - all of the lines.
I cannot shrink the size, because minimum size of header by default is the maximum element bottom position.
Can I control the size of height of the header dynamically?
Thanks :)
Page header and footers can not be dynamically sized. This allows support for more output devices but limits its use for many situations. A common work around is to use a Parent group above all others in your dataset that has a sql command that returns 1 row such as SELECT OneRow=1. You could place your header logic in this print once groups header and optionally show or hide the header based on first page last page etc.

SSRS hidden column creates extra blank page

I have a report with a Tablix where I would like it almost full page width. "Gross Pay" is visible or not based on a parameter. I have also added a blank column to the left of this which has the opposite visibility to "Gross Pay" as a work around for the fact that I can't resize tablix width dynamically so the whole tablix stays the same width.
This is all fine and works but spits out an extra page when saving to pdf. This is because my body width is greater than 21cm. Below is the tablix, the red line is where page end is.
My body width must be 24cm in the designer to accommodate this hidden field but will always display under 21cm in the end. Can I have a body width in the designer larger than the page size? Alternate solutions would also be appreciated.
Thanks!
I ended up removing the blank column and just using expressions for all fields on the "Gross Pay" column that would fill it as blank if appropriate parameter was set.

Repeat a vertical line on every page in Report Builder / SSRS

I wish to include a vertical line on every page of my report, which runs from the top to bottom of the report body. How can I achieve this?
I've tried using RepeatWith, but it doesn't seem to work, the line appears only on the first page.
Thanks
Is this for look and feel purposes only?
I would create an image with such line and use it as the body background. Or if you're using a tablix that spans across multiple pages, another idea would be to create an empty column on the tablix with a border on the left side.
And yet another idea would be to use a rectangle with a left/right border and place all your tablixes inside the rectangle as this would make the rectangle to be expanded to multiple pages keeping the border (the vertical line) on your report.
I don't think that you can tell SSRS to automatically repeat lines on multiple pages.
I've figured out a way to solve that problem (without using RepeatWith, RepeatOnNewPage or Report Background Image)
I wrote a simple code to add blank rows to the table in the body. The number of rows to be added will be determined by the body height and the height of a row.
For example, if the body height is 6" and height of a row is 0.5" then a total of 12 rows can be fitted into one page. So if your table has 4 rows then add 8 extra black rows so as to make the table height equal to the report body.
If the number of rows is more than 12, say 15, then you'll add [12 - (15 mod 12)] rows
, i.e. 9 blank rows.
And you can have side borders on any of the columns as required, resulting in a vertical line running throughout the page.

Three column layout with fixed columns

I am searching for a three column layout (Full screen) with header and footer (Not Liquid/Fluid design). i.e.
when I re size my browser then my content should not be replaced.
Also, no matter how any of the three column is longest footer will
come in the bottom.
Last, even if there is no content on the 3 columns to fill the page, footer will come in the bottom.
(Also need suggestion, which method is useful to keep my design constant in almost all major browser , is it %(table, tr,td), px or em ?)
In other words, Just like facebook.
IF you're looking for a 3 column design you'd best go with div elements and using a certain % for each column. If you'd use a fixed width in either px or em, you can end up in troubles (columns moving to below each other) upon resizing too much. However, if you use a percentage and resize, you'll get problems too below a certain resolution, but for larger resolutions % are usually more perfect. A downside of the percentage approach is that you can't always lay out the page like you'd want exactly, since the percentage makes the columns change in width depending on the screen viewed on.
Making sure the footer is below the columns can be achieved by using a clear css tag on either the last column, or on an br element after the column but before the footer for example.
Update:
An example of the 3 column layout with footer on bottom: http://puu.sh/9tga
Example with 3 column, header, footer: http://puu.sh/9tm6
Example with fixed header and footer: http://puu.sh/9toj
Sounds like you could use Twitter Bootstrap and use the 3 column layout (or choose among the other ones).