Microsoft KB Archive/938943

= 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 =

Article ID: 938943

Article Last Modified on 7/9/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Reporting Services
 * Microsoft SQL Server 2005 Reporting Services

-





SYMPTOMS
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.



CAUSE
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.



WORKAROUND
To work around this behavior, follow these steps:
 * 1) Make sure that your report does not use the Subreport control.
 * 2) Move the data in the subreport into the main report.



STATUS
This behavior is by design.



Steps to reproduce the problem
 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.</li> In the Location box, type the location of the report project, and then click OK.</li></ol> </li> Create a new report definition file. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> In Solution Explorer, right-click Reports, click Add, and then click New Item.</li> In the Add New Item dialog box, click Report under Templates.</li> 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.</li></ol> </li> Set up connection information. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> On the Data tab, expand the contents of the Dataset list, and then select New Dataset. The Data Source dialog box appears.</li> In the Name box, type AdventureWorks .</li> In the Type box, select Microsoft SQL Server.</li>  In the Connection string box, type the following, and then click OK: Data source=(local); initial catalog=AdventureWorks </li></ol> </li> Create a report. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> On the [Design]* page, click the Layout tab.</li> On the toolbox, click the  control to put the Subreport control on the designer. Then, click the designer.</li></ol> </li></ol>

Notice that the Properties dialog box does not display the KeepTogether property. Therefore, the subreport uses the implicit behavior of the KeepTogether property.

Keywords: kbtshoot kbprb KB938943

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.