Reportviewerwebwebpart: uncaught SYS. argumentnullexception: SYS. argumentnullexception: The value is not displayed.

Source: Internet
Author: User

There may be three reasons:

1. The reportservice version is too low, so you can upgrade SQL Server 2008 R2 SP2. Add the scriptmanager attribute in the master page to scriptmode = "release" 3. The web site. in config, <compilation batch = "false" DEBUG = "false" optimizecompilations = "true"> is set. This error occurs when debug is set to true. Among them, 1st and 2 may not be the main reasons, but I have installed SP2 during the test, so it is impossible to uninstall it and then test it. I think so. In addition, the method for controlling the reportviewerwebpart filter parameters and zooming is attached:   In the background of the pageCodeTo add (or directly write to the aspx file ):
 
 protected override void onload (eventargs e) {If (! This. ispostback) {reportviewerwebpart viewer = findmainwebpart 
  
    (); If (viewer! = NULL) {viewer. overrideparameters. clear (); viewer. overrideparameters. add (new Microsoft. reporting. webforms. reportparameter ("AA", "13, 14", false); 
   
reportviewer rptviewer = reflectorutils. getfield ("m_reportviewer", viewer);
rptviewer. zoommode = zoommode. pagewidth;
} Base. onload (E );} /// <summary> /// find the webpart of the page /// </Summary> /// <Param name = "webpartzoneid"> ID of webpartzone </param> // /<returns> </returns> protected t findwebpart <t> (string webpartzoneid) where T: Microsoft. sharepoint. webpartpages. webpart {# region commented: Use the master to find the control of a specific webpartzone // 1. in this method, only the webpart // contentplaceholder holder = (contentplaceholder) master in the specified region can be obtained. findcontrol ("placeholdermain "); // If (holder! = NULL) // {// webpartzone zone = (webpartzone) Holder. findcontrol ("Main"); // foreach (webpart control in zone. webparts) // {// If (control is required tlistviewwebpart) // {//} # endregion t result = default (t); spwebpartmanager = spwebpartmanagerinpage; if (spwebpartmanager. zones! = NULL) & (spwebpartmanager. zones. count> 0) {foreach (Microsoft. sharepoint. webpartpages. webpartzone zone in spwebpartmanager. zones) {If (zone. id = webpartzoneid) {foreach (Microsoft. sharepoint. webpartpages. webpart in zone. webparts) {If (webpart is t) {result = (t) webpart; break ;}} if (result! = NULL) {break ;}} return result ;} /// <summary> ///// </Summary> /// <typeparam name = "T"> </typeparam> /// <returns> </returns> protected t findmainwebpart <t> () where T: Microsoft. sharepoint. webpartpages. webpart {return findwebpart <t> ("Main ");}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.