We have a problem in page layout. From the report properties, we set the page width and length. But previewing the page finds the page is much longer than setting in the properties. Exporting the page to PDF gets different page size. That totally messes up our page number. Anyone had this problem before and knows why.
I appreciate it if anybody can help. Thanks.
make sure you added the borders. The size of the report (not the actual paper size) will be added to the border size which might exceed in some cases the PDF (paper) size. Therefore some extra page braks will occur, leading to broken documents or empty pages.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Thanks for the reply Jens. I set the page margin all four sides as 0.25, page width = 8.5in and length = 11in. When I view the page, I have two pages display on screen. And the page width and length does not look like what I set in page properties. Exporting to PDF gets five pages. And when I open PDF, I get a "A drawing error occurred" message.
The width is OK. The problem is length. How can I fix page length?
Thanks.
|||Hi,just to be sure, the sum of borders and width does not exceed 8,5 / 11 inches, right ? You have to differ between the margins of the Report and the actual paper size. If the Report does not dit on the paper size, you probably will get extra pages. For the mentioned error: Which SQL Server version (Reporting Services) are you using ? If you are not sure you can navigate through the reporting server to http://server/Reportserver . The version informaiton is written on the bottom of the listing. There might be a rendering error which was fixed in later version (assuming that you have an old one)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Jens, You are right. After I switched to VS 2005, the PDF file error goes away. But the page size problem still remains.
I believe I have set the page layout carefully. There should not be width exceedings problem. And I did not see blank pages or partial pages. The page layouts in report view and printing view are different. In report view, the first page has 7 items. But in printing view or exported PDF, the first page only has 5 items. Other items are moved over the subsequent pages.
This should not be a problem for most situations. But we have a special requirement needing to use the page number to determine the display of body information. Since footer page number can not be directly referenced (I do not know why MS design in this way), I tried to group by items using ceiling(rownumber(nothing)/5). But this function seems only group by the innest. For example, for three layers' group - address, city, state that expression only group by address only while I need to group it by city (I don't know whether or not I have missed something).
So I had to switch to another way. Run the report two times, first time get the items and page number into database. Second time read from database the stored information to display it correctly. But if the printed page layout and the run time page layout are different, I can not do it in this way. That is why I need to figure this out.
Thanks for the suggestions.
|||The pagination system is different between the different renderers.HTML is a "soft" page layout -- in other words, it will try to use the interactive page size, but will expand as needed to accomodate objects on that page and to avoid splitting objects.
PDF is a physical page layout; the page size is fixed and we cannot expand it, so objects get broken and moved around on the physical pages.
Page numbers will not be the same between different pagination systems. Unfortunately you really can't rely on the number of pages or the page number to determine the data on the page.
No comments:
Post a Comment