Wednesday, July 20, 2011

ReportViewer: Another Reason to “Sys.ArgumentNullException: Value cannot be null. Parameter name: panelsCreated[..]”

If you are stuck with a blank screen when using the ReportViewer control that ships with Visual Studio 2010, check if you provided values for all the parameters in the report. We created a report using {CTRL+C CTRL+V} on an existing report, and the second report used only 3 of the 4 parameters on the original report. We did not provide any value to the last parameter, and it had no default value configured, so the ReportViewer rendered a blank panel on the web form, and generated the following JavaScript error:

Sys.ArgumentNullException: Value cannot be null. Parameter name: panelsCreated[1]

When we edited the report's RDLC file (I could not find the "Report Parameters" menu option that should be under the “Report” menu in Visual Studio, so I opened the RDLC file using Visual Studio XML Editor), and took off the unused parameter defition, the ReportViewer rendered ok. Thanks to this post for pointing me to the right direction.

2 comments:

  1. EXCELLENT information. Your directions are clear and concise, and easy to follow. Thanks for your hard work in posting this info.

    ReplyDelete
  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru Dot Net Training in Chennai. Nowadays Dot Net has tons of job opportunities on various vertical industry.
    or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete