Error : Object refrence not to set to an instance of an object -SSRS 2008 (Export to Pdf)

Answered Error : Object refrence not to set to an instance of an object -SSRS 2008 (Export to Pdf)

  • Monday, March 18, 2013 2:41 PM
     
     

    Hi Experts,

    There is a strange issue i noticed when i try to export an empty report , i get an error show in the attachment in this thread . Some more info i want to give is, we have upgraded from SSRS 2005 to SSRS 2008 a week before . I have done some investigation and found something :

    1. This error is not show up for all the reports even the if you try to export an empty report.

    2. It works fine for other exports like , Excel, web page etc..

    3. The Report doesn't has any sub report .

    It is very strange , that this error seems to report specific. Could you please help me with a solution

    any help would be really appreciated .

    Thanks

    Chaithanya M


    Regards Chaithu.. If it is usefull,Mark this as Answer.



All Replies

  • Monday, March 18, 2013 3:39 PM
     
     

    Try these workarounds.

    Workaround #1

    Have you got any subreports in this report? If Yes, try this and see if this will fix the issue

    Have the subreport inside a Ractange and Set KeepTogether property of Rectange to false.

    Workaround #2

    See if hieght of the report body meets the below condition, if not adjust the hieght of body/footer/header to meet the condition.

    body hieght + header hieght + footer hieght + top margin + bottom margin < page hieght

  • Tuesday, March 19, 2013 6:14 AM
     
     

    HI Veeresh,

    Thanks for your reply . could you please tell me how does it worked in SSRS 2005 and now , not working when we upgrade reporting service to 2008. How does a report which has empty result can be a size problem(Workaround 2)  ?

    Also FYI,

    My report doesnt has any sub reprot

    Regards

    Chaithanya M


    Regards Chaithu.. If it is usefull,Mark this as Answer.

  • Wednesday, March 20, 2013 8:01 AM
    Moderator
     
     Answered

    Hi Chaithanya M,

    This is a known issue in SQL Server 2008 Reporting Services. The issue occurs due to the particular design structure of the report such as:

    • Combination of merged cells
    • Presence of an expression in page footer
    • The KeepTogether property is set to true for particular subreport
    • The particular tablix or subreport returns no rows

    According to different root causes, the workaround can be removing the page footer or increasing the textbox size within the page footer, setting the KeepTogether property to false, setting the NoRowsMessage property for the target tablix or subreport to “ ” (a space).

    Additionally, the known issue has been fixed in the CU4 for SSRS 2008 R2 SP2.

    If the issue persist, you can send me the RDL files to sqltnsp AT Microsoft.com (Please replace AT with @) so that we can make further analysis and help you out.

    Regards,


    Mike Yin
    TechNet Community Support

  • Thursday, March 21, 2013 4:48 AM
     
     

    Hi Mike,

    Thank you so much for the reply. That was really great!!. One more quick question i have is , why this new problem is injected in the RS 2008 . I see this problem doesn't exist in RS 2005.

    Regards

    Chaithanya M


    Regards Chaithu.. If it is usefull,Mark this as Answer.

  • Sunday, March 24, 2013 1:12 PM
    Moderator
     
     

    Hi Chaithanya M,

    Thanks for your posting.

    You are right that the issue doesn't occur in SSRS 2005. After upgrading to SSRS 2008, there are behaviors changes in report authoring; therefore, an issue that doesn't occur in SSRS 2005 may occur in SSRS 2008. However, an known issue in SSRS 2008 will be fixed in SSRS 2008 R2 generally.

    Regards,


    Mike Yin
    TechNet Community Support