asp.net - ssrs reportviewer loading to infinity without error message -
when run report with parameter in asp.net application see loading div infinity without indication of error (so dont know how search issue in google)
note1: can run same report directly report server
note2: if removed parameter run asp.net page report server
protected void page_load(object sender, eventargs e) { oid = (int64)session["oid"]; viewreport(); } public void viewreport() { string reportserverurl = configurationmanager.appsettings.get("reportserverpath"); reportviewer.serverreport.reportserverurl = new system.uri(reportserverurl); reportviewer.serverreport.reportpath = @"/storeports/myreport"; reportviewer.serverreport.setparameters(new reportparameter("oid", oid.tostring())); reportviewer.serverreport.refresh(); }
in function called sys$webforms$pagerequestmanager$_endpostback(error, executor, data)
tools sql server denali , visual studio 2010
this article explains issue in details
1-browser makes request aspx page page content , loading indicator report.
2-browser makes post request aspx page html report (this content in updatepanel).
3-browser makes requests http handler images in report in step 2 request report content runs asp.net page, including code have placed in page.
why matter? code added load event of page altered state of report viewer. common example i’ve seen user code calling setparameters in load event, though there several methods , properties trigger this. changing parameter values tells reportviewer needs restart report processing. effectively, tells viewer return step 1 – put loading indicator in browser , restart report processing. if during every postback, viewer never completes step 2. goes infinite loop.
calling methods setparameters isn’t cheap. each call triggers round trip report server. it’s call want minimize anyway. calling setparameters during initial request or when parameter values have changed, can improve performance of application , break loop. simple check of ispostback before calling setparameters sufficient.
Comments
Post a Comment