Sunday 23 October 2016

Blank Page Issues – SSRS Reports


 I talked about discussing extra space issues aka ‘Blank page issues’ Dynamics AX. So, today we will walk through the problem and try to find a solution (or a set of possible solutions) that works every time. With that said, I would like to point out that the ‘Blank page issue’ is such a black-hole in itself that no one can ever guarantee that following some specified set of steps would save you from falling into that ditch, but this will serve as an pro-active attempt to reduce the percentage of getting into trouble.

So, what is this blank page issue actually?

At first glance, when you print your recently modified report to the screen it looks like it is working the way it is supposed to. But, actually if you try to print the same report or save it to pdf you will realize that it is printing an extra page. This extra page can be at the end of the report (in this case, only one extra page is printed in total) or there could be one normal, one blank page, one normal and one blank page which has now doubled the amount of pages you actually needed.

So, why does this Blank page issue arise?

There could be many answers to this, some experts would argue it’s the settings some would say it’s the developer and we would certainly discuss all those arguments when going through the solution. But for now, I will keep it simple; this happens (in most cases) when you have content flowing beyond the body size of the report.

Blank Page Solutions

1)      Make sure that the page you are actually using in the printer is specified correctly in the Report print setting, for example if you are using European A4 instead of US Letter(mostly used) you would need to specify that change(by default it is set to US Letter). Reason being, European A4 (8.3 x 11.7 inches) and US Letter (8.5 x 11 inches) have different dimensions.
2)      Make sure that the Body size is set to correct limits. Body Width = Page Width – Left Margin – Right Margin, so for US Letter the Body size would be <=7.5in (8.5 – (0.5+ 0.5)) and similarly for European it should be 7.3in.
When we take a look at the VS report for FreeTextInvoice we find that the Body size is 8.11in which is more than 7.5in and hence causing the blank page issue.
If you absolutely cannot make your report work in the Body Size of <=7.5, the only other option you have left is to actually modify (decrease) the margin(Left, Right) size; the basic rule while playing with this page width and body size properties are that your actual Report width should not go beyond the defined Page width.
3)      If you believe that for any reason you may have accidentally changed the column (or textboxes) width while re-arranging some of the textboxes or if you have added new columns (or textboxes) it is the high time that you take a note of those new additions or changes because it is highly prominent that this is causing the blank page issue.
My dear friend Bill suggested that we can color those textboxes that we recently monkey’ed with, reason being that this will allow you to actually visualize which textboxes are actually going over-width when we see the corresponding color printed on the 2nd page (blank). This is very easy and also saves developer a lot of hit and trial time.
4)      There is a property called ‘CanGrow’ for textboxes, MSDN specifies that if set to True, it will allow the section or control to grow vertically so that all data it contains can be printed or previewed. We need to make sure that we have this property set to False.
5)      In the Report properties, Set ConsumeContainerWhiteSpace property to True.
6)      Under Print destination settings – Properties – Check “override default settings”:
7)      Try minimizing the white space at the end of the Report, this is purely a work-around.

For other blank page problems in Microsoft Dynamics AX, check out the related posts.

No comments:

Post a Comment

Labels

#veryusefulcode (1) AIF (8) AOT Maps (1) Args (1) Ax 2009 Reports (2) AX 2012 navigation (1) Ax 2012 Interview Questions (1) AX 7 (2) AX Architecture (1) Ax Backup (1) AX Workflow (2) AX2012 (1) AX2012 R2 (1) Ax2012R3 (1) AX2012R3 Dynamics Connector Step by Step Installation and Configuration (1) AX2012R3 EP Step by Step Installation and Configuration EP R3 (1) AX2012R3 HelpServer Step by Step Installation and Configuration (1) AX2012R3 Rapid Start Connector Step by Step Installation and Configuration (1) AX2012R3 Report Server and Analysis Server Step by Step Installation and Configuration (1) AX7 (1) Best practices (1) Blocking user to enter (1) Collection Classes (1) Container (1) D365FO (3) Data Migration Frame Work ax 2012R3 (1) Deleting duplicate Record from Table – Ax2012 (1) Delivery due date notification workflow in Ax 2012 (1) Development Steps EP (1) Dimensions (1) DIXF (1) DMF in Ax 2012 R3 (1) Dynamics Ax 2012 Interview Questions (1) DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 2 (1) DYNAMICS AX 7 (1) EDT relation Migration Tool (1) EP AX 2012 (1) Ep Lookup (1) Error (1) Event Handler (1) F5 (1) File Handling (4) Filter on AX2012 Listpage (1) filtering (2) financial dimensions in AX 2012 (3) form (1) images (1) Installation and Configration (4) Installation and Configuration (11) Installation of Management Reporter 2012 for AX 2012 (1) Interaction class in ax 2012 (1) Interview Question (1) Interview Questions For Ax 2012 (1) Invent DIm (1) Jobs (2) license (1) List page and form menuitem enable code (1) Methods (1) microsoft Dynamics AX 365FO (1) Number Sequence Generation – AX 2012 (5) Number Sequence2012 (1) OLTP-OLAP (1) Passing Args (1) Passing form caller and menu item caller in ax 2012 (1) Passing Multiple Records Args (1) Posting in Ax 2012 (1) POSTING PURCHASE ORDER (1) Query (1) Query Filter Form (2) Query Ranges in X++ (1) Question and Answer (1) Report (1) Reports Controller class (1) RLS in ax 2009 (1) SALES ORDER IMPORT/EXPORT FRAMEWORK BY DMF (1) Security (1) security roles (1) Security Sysqueryrangeutil (1) Sharepoint 2016 (1) SQL SERVER (1) SSRS (2) SSRS Reports Controller class (2) Table collections & Virtual company (1) Time (1) TIPS AND TRICKS (1) Web service AIF (3) Web Services on IIS (AIF) Step by Step Installation and Configuration (1) workflow ax2012 (1) Workflow installation (1) Workflow Method (3) X++ (1)