Wednesday, February 2, 2011

Report with blank pages

I am assigned to a reporting project recently and have encountered this issue. I thought I need to write it down for future reference.

 Problem:

When I developed reports in BIDS, The report looks find in the Designer and report manger. However, when it comes to be exported to as PDF or simply printed out, quite a few blanks pages appeared from nowhere.

Solution:

1. Margin size and body size

This is the first step you need to look into. The following formula may help you calculate the right size

Body width size = Page widthsize - (Left margin + Right margine) – Border width

For example, the page size is defaulted as a letter ( 8.5x11in) and margins are all .25 inch.

In this case, the theoretical body width size <= 8.5-(0.25+0.25) which is 8in. Normally I will give out another .5 inch for buffering.

 

2. CanGrow properties on Textbox

Sometimes, you need to play with this properties

 

3. ConsumeContainerWhiteSpace property on Report level

The default is false. You have to turn it to true in order to remove blank pages

 

I’ll keep posting tips on SSRS . So many tiny things to keep in mind