WinForm Report Viewer shows an "Object Reference not set to an instance of an Object" message after the "Find" option gets used RRS feed

  • Question

  • Hi all,

    In a WinForm application (VS2010 Ultimate, Frmwk 4.0), I have a report viewer showing up a local report (.rdlc). Everything is ok, I can scroll pages, expand grouped rows (drill-down), zoom-in & out, print out the data, export it to Excel or Pdf or Word, etc., until I try to use the "find" option in the navigation bar; after any find try I get a "Object Reference not set to an instance of an Object" message in the report area.

    This is  even more strange to me considering I have another very similar report, based on the same binding source (on same datatable of the same dataset), showing up the same data just re-ordered, and it is perfectly working, even in its find option.

    The report has just one tablix in tied to a datatable.

    I tried to rebuild the report by scratch (avoiding any custom expression in the report cells – just the field value reference or its Sum), but unsuccessfully.

    Is there anybody having an idea on what’s going on? Any suggestion for a workaround?

    Thanks in advance for any help.


    Sunday, September 19, 2010 8:47 PM

All replies

  • Found the problem: if you hide away a column by shrinking its width to 0, the find option doesn't work anymore, producing the annoying message "Object Reference not set to an instance of an Object"

    • Proposed as answer by JerryF Saturday, March 10, 2012 9:49 PM
    Tuesday, September 28, 2010 11:48 PM
  • I had the same problem. I need the column for the document map but I don't want it be seen. So hiding it doesn't work for me. What I did instead was to increase the column width to 0.1in and set the foreground color to my background color, white.


    • Edited by JerryF Tuesday, March 13, 2012 2:56 PM
    Saturday, March 10, 2012 9:51 PM