Last post Jun 18, 2013 02:12 AM by mishra.bhupesh
Jun 17, 2013 01:31 PM|Joy2101|LINK
I am using reports in my web appliation and we fixed the header of the report. Now what the problem we are facing is , when we scroll down, the alignment of the header and the rows got changed .If we dont scroll it looks fine, once scroll down alignment
got changed, some field of the column width got increased that the header of the field.
I inreased the tablix width and it works fine but again after few days i faced the same issue in the same report.
i tries with most of the combination but failed to solve this.
Please tell me if there is any solution to get this proper alignnment, since this is a production issue and i need the solution urgently
Thanks & Regards,
Jun 18, 2013 02:12 AM|mishra.bhupesh|LINK
When you are editing the rdlc file in design mode, firstly click on an empty part of the BODY area of your design. Hit F4 to see the properties tab. Here, you will see a "Size" property. This can be expanded for the width and height. The width you see here
represents the width that the body of your report requires as printable area. Even if you have white space all over, the page knows that it needs to keep it as a printable area. It reserves the space, in some sense. As for the height, the system generally
knows that it can grow or shrink as necessary, unless you have specified otherwise within your controls therein. So the width is what will, usually, play the most important role.
Next, click on an empty area of the report (outside the header, body, and footer; basically the gray area around the design), then hit F4 to view the properties panel. Under the "Layout" category of the properties, you will see 3 different options: InteractiveSize,
Margins, PageSize. Each of those Size attributes can be expanded to show the Width and Height. The Margins attribute can be expanded for the left/right/top/bottom.
Basically, the pdf export works out of the PageSize (though I generally try to keep Interactive and Page size equal). When the pdf file is rendered via the ReportViewer's built-in export function, the width and height of each "page" within the pdf will be
determined by the width and height in the report's PageSize attribute (you could override this if you used your own custom code for the pdf rendering). As for the margins, they specify how much space MUST be left blank and unprintable between the printable
area reserved for your report and the edge of the page.
In other words: Your report's Body's Width, Plus the Report's Left Margin, Plus the Report's Right Margin, MUST be smaller than or equal to the Report's PageSize's Width!
So...if your margins are too wide, or if your report's body is too wide, or if the PageSize's width is too narrow, the rendered result is forced to be broken down to multiple pages in order to fit!
For example: If my report's body has width 7.75", my Left margin is 0.5", my right margin is 0.5", and the width specified in the PageSize is 8.5", my report will always use 2 pages for each 1 page of data. The 7.75" width of the body, plus 0.5"+0.5" for
the margins add up to 8.75", which is larger than the 8.5" available in my page. So the first 7.5" (or so) of each page of my report's body will be shown in the first page, and the rest will be split down to the next page. This will not be done inside the
report viewer, as it allows for the report to grow beyond the page size by just adding a scrollbar, but it will be annoyingly noticeable in the pdf export. In order to make my example report fit in 1 page, I can either try and reduce the body of my report
to 7.5" or less, or I can reduce the left and right margins by a total of 0.25" or more (for example, set them to 0.3" for a total reduction of 0.4"), or I can increase the PageSize to something larger than 8.75". Note: Acrobat Reader is pretty smart and knows
about various paper sizes. Therefore, while arbitrary PageSizes will work, it is typically best to use real page sizes. As such, in my last example I would rather set the PageSize to have Width = 11" and Height = 8.5", which is a real letter-size in landscape!
Adobe will typically understand this and print properly. Also Note: Some printers, especially older ones, have trouble printing with less than 0.3" margins. If you want to be nice to your users, you should best keep the margins large enough for those older
See it here : http://stackoverflow.com/questions/427730/how-to-limit-rdlc-report-for-one-page-in-a-pdf