Article ID: 938943 - Last Review: July 9, 2007 - Revision: 1.1
Blank space appears in the file when you export a report to a physical page format file in SQL Server 2005 Reporting Services or in SQL Server 2000 Reporting Services
In Microsoft SQL Server 2005 Reporting Services or in Microsoft SQL Server 2000 Reporting Services, blank space appears in a file that you export. This problem occurs if the following conditions are true:
You export the report to a physical page format file, such as a PDF document or an image file.
The report contains a subreport.
Additionally, blank space appears in the preview report when you preview the report before you print it.
This behavior occurs because the Subreport control has an implicit KeepTogether property. By design, the KeepTogether property tries to keep content of a subreport on one page. Because of this behavior, the report engine creates blank space on the main report if the subreport does not fit on the same page as the main report. Then, the report engine creates the subreport on a new page.
In SQL Server Business Intelligence Development Studio, create a report server project. To do this, follow these steps:
Click Start, click Programs, click Microsoft SQL Server 2005, and then click SQL Server Business Intelligence Development Studio.
On the File menu, click New, and then click Project.
In the New Project dialog box, click Business Intelligence Projects under Project Types, and then click Report Server Project under Templates.
In the Name box, type the name of the report project.
In the Location box, type the location of the report project, and then click OK.
Create a new report definition file. To do this, follow these steps:
In Solution Explorer, right-click Reports, click Add, and then click New Item.
In the Add New Item dialog box, click Report under Templates.
In the Name box, type the name of the report, and then click Add.
Note The Report Designer opens and displays the new .rdl file in the Data view.
Set up connection information. To do this, follow these steps:
On the Data tab, expand the contents of the Dataset list, and then select New Dataset. The Data Source dialog box appears.
In the Name box, type AdventureWorks.
In the Type box, select Microsoft SQL Server.
In the Connection string box, type the following, and then click OK:
Data source=(local); initial catalog=AdventureWorks
Create a report. To do this, follow these steps:
On the <ReportName>[Design]* page, click the Layout tab.
On the toolbox, click the <ReportName> control to put the Subreport control on the designer. Then, click the designer.
Notice that the Properties dialog box does not display the KeepTogether property. Therefore, the subreport uses the implicit behavior of the KeepTogether property.