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 ");}