I've searched high and low for an answer for this but no one seems to have a similar problem.
I've got a report which works fine. It fits to 1 page and only goes over if some of the content in some of the rows grows to push it over 1 page. However, for the current data I'm using this doesn't occur and it sits on 1 page with plenty of room to spare.
I've now added another row, which is hidden based on a expression using a field within a dataset. The field contains either an "N" (indicating not to show the row) or a "Y" (show row). When the expression is 'true' ("Y" - show) the row isn't hidden and no extra page is shown but when it returns 'false' an extra blank page with footer appears at the end of the report. I've reversed the logic (tests for "N") and as expected when "N" is true the row is shown (no extra page) and when it's false the row is hidden and an extra page is shown.
I've also tested this by removing the expression completely and the report shows the row at all times and the report is only 1 page. So this tells me it's something to do with the visibility condition that's causing the extra blank page to appear.
I've also tried removing the expression completely and setting the LineHeight to 1pt, CanGrow = true, CanShrink = true, then creating an expression evaluating the same the flag mentioned for "Y". If so then format the specified field otherwise return "". I've input this expression into all of the columns in the row. The expression is =Iif(Fields!DisplayFlag.Value = "Y",Format(Fields!Myfield.Value, "#,###,###,##0"),""). I've also tried replacing the "" for the false result to Nothing to ensure no whitespace was being input. My theory was that in this case if all cells in the row were "" or Nothing then the row would remain 1pt in height. However, the row showed blank space and was set to it's previous height. I tried editing the Xml to fix the row height there and this had the same result.
I've further tested the visibility and the problem is also happening when I simply select 'Hide' row rather than 'Show or Hide based on an expression'.
Anyone got any pointers / help?
Finally found the culprit. At some point through my various alterations I found that the rectangle container that contained the data tablix needed to be enlarged. I increased it by 0.3cm and it worked fine. What I still don't understand is why this was causing the report to create a second blank page when the row was HIDDEN (making the report smaller). My only guess would be that when the report was visible it was given a set height but when it was hidden (but presumably still populated) it didn't know how much space to allocate to the row or perhaps gave it a default height that was larger than what I gave it.
- Edited by sr28 Monday, November 11, 2013 3:34 PM
According to your description, I create a similar report in my test environment. However, I cannot reproduce the same issue as your post.
In your case, we can add border for the rectangle then preview the report to check if it is the issue with the rectangle have been enlarged. If not, the issue may be caused by the Body of our report being too wide for our page.
There is an article about The "Every Other Page Is Blank" Feature, you can refer to it.
If you have any questions, please feel free to ask.
TechNet Community Support
- Marked as answer by Alisa TangMicrosoft contingent staff, Moderator Tuesday, November 19, 2013 1:22 AM