c# - MVC 2 and the reportviewer with SSRS 2005 - white page, no error -
i having issue reportviewer nothing visible, not control. if add other content, shows, reportviewer not. using 9.0.0.0 version of control ssrs 2005 inside mvc 2.0 application. have built , deployed report server. have confirmed looking on report server , running there.
- my app mvc 2.0
- i have added regular webforms page root of website. put in form, runat=server, , enabled viewstate
- i have added .aspx routing exception
- my code behind set every example can find
- my webconfig configured (maybe issue is)
- i set manual test forcing correct values in , same blank page.
- i have reference 9.0.0.0 versions of microsoft.reportviewer.webforms , microsoft.reportviewer.common , can see web.config matches references.
the page appears white - no control visible. no errors thrown. remembered it, there should @ least blank reportviewer control on page, there isn't there @ all.
a few other oddities - if remove parameter setting, no error occurrs. added code send in credentials, did not work, when sending in credentials administrator account.
report.aspx
<%@ page language="c#" autoeventwireup="true" viewstatemode="enabled" codebehind="report.aspx.cs" inherits="mysite.web.report" %> <%@ register assembly="microsoft.reportviewer.webforms, version=9.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" namespace="microsoft.reporting.webforms" tagprefix="rsweb" %> <html> <body> <form id="form1" runat="server"> <rsweb:reportviewer id="reportviewer" enableviewstate="true" runat="server" /> </form> </body> </html>
routing exceptions
routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.ignoreroute("{resource}.aspx/{*pathinfo}");
code behind
protected void page_load(object sender, eventargs e) { var qs = reportquerystring.parse(request.querystring["r"]); reportviewer.serverreport.reportserverurl = configurationhelper.reports.reportserverurl; reportviewer.serverreport.reportpath = string.format(configurationhelper.reports.reportpath, qs.reportname); var result = p in qs.parameters select new reportparameter(p.key, p.value); reportviewer.serverreport.setparameters(result); reportviewer.serverreport.refresh(); }
web.config
<compilation debug="true" targetframework="4.0"> <assemblies> <add assembly="system.web.abstractions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.web.routing, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.web.mvc, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="microsoft.reportviewer.webforms, version=9.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> <add assembly="microsoft.reportviewer.common, version=9.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> </assemblies> <buildproviders> <add type="microsoft.reporting.rdlbuildprovider, microsoft.reportviewer.common, version=9.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" extension=".rdl" /> </buildproviders> </compilation> <pages> <namespaces> <add namespace="microsoft.web.mvc" /> <add namespace="system.web.mvc" /> <add namespace="system.web.mvc.ajax" /> <add namespace="system.web.mvc.html" /> <add namespace="system.web.routing" /> <add namespace="system.drawing" /> </namespaces> </pages> <httphandlers> <add type="microsoft.reporting.webforms.httphandler, microsoft.reportviewer.webforms, version=9.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" path="reserved.reportviewerwebcontrol.axd" verb="*" /> </httphandlers>
edit:
as requested, here page source. on side note, using chrome, did try ie same result.
<html> <body> <form method="post" action="report.aspx?r=ryej28xc7emx1pjpgirkoi1lxjmmne6pf7ajrej443w*" id="form1"> <div class="aspnethidden"> <input type="hidden" name="__viewstate" id="__viewstate" value="/wepdwullte0nzmwntuwmtgpzbycagepzbycagepfcsaba8wah4oumvuzgvyaw5nu3rhdgulkzubtwljcm9zb2z0lljlcg9ydgluzy5xzwjgb3jtcy5szxbvcnrszw5kzxjpbmdtdgf0zswgtwljcm9zb2z0lljlcg9ydfzpzxdlci5xzwjgb3jtcywgvmvyc2lvbj05ljaumc4wlcbddwx0dxjlpw5ldxryywwsifb1ymxpy0tlevrva2vupwiwm2y1zjdmmtfkntbhm2eczcgpwfn5c3rlbs5hdwlklcbtc2nvcmxpyiwgvmvyc2lvbj00ljaumc4wlcbddwx0dxjlpw5ldxryywwsifb1ymxpy0tlevrva2vupwi3n2e1yzu2mtkznguwodkkotq5nwqxotetmmvmmy00otjlltk1ztgtmzrhzdbkywi4zgm4ageukwabfcsaagibzbykzg8pfgieb1zpc2libgvozgqcaq8pfgifawhkfgicca8pfgifawhkzaigdxychgvwywx1zqubmgqcbw8wah8cbqvmywxzzwqcca8wah8cbqvmywxzzwrkvle8texowyriwvlykp+gfwuxbrw+matpudojqbm994u=" /> </div> <script src="/reserved.reportviewerwebcontrol.axd?optype=resource&version=9.0.30729.4402&name=microsoft.reporting.webforms.scripts.reportviewer.js" type="text/javascript"></script> <div class="aspnethidden"> <input type="hidden" name="__eventtarget" id="__eventtarget" value="" /> <input type="hidden" name="__eventargument" id="__eventargument" value="" /> <input type="hidden" name="__eventvalidation" id="__eventvalidation" value="/wewbglgrv+ucwl8sqiibgl8sqyibgl8srcibgl8srsibgl8stiibkbkdslujxfvd65ms2oqpfo01z367cpqhxodmzguuzmc" /> </div> <div id="reportviewer" style="display:inline-block;height:400px;width:100%;"> <script language="javascript"><!-- if (document.getelementbyid('reportviewer') != null) { document.getelementbyid('reportviewer').clientcontroller = new rsclientcontroller("reportviewer_ctl03", "reportframereportviewer", "/reserved.reportviewerwebcontrol.axd?mode=true&reportid=b003c2a678b44c71b949617a693d4f8c&controlid=9495d1912ef3492e95e834ad0dab8dc8&culture=1033&uiculture=1033&reportstack=1&optype=docmaparea&controller=reportviewer&rootlabel=&backcolor=%23ece9d8&border=1px+black+solid&font=font-family%3averdana%3bfont-size%3a8pt%3b", "25%", false, "/reserved.reportviewerwebcontrol.axd?mode=true&reportid=2558c6ccaa09444ea46bd3062bc553dd&controlid=9495d1912ef3492e95e834ad0dab8dc8&culture=1033&uiculture=1033&reportstack=1&optype=reportarea&controller=reportviewer&linktarget=_top", true, true, true, true, true, true, "reportviewer_ctl06", false, "\/reserved.reportviewerwebcontrol.axd?mode=true&reportid=66fb690f271c48d59bc881cd0f07421d&controlid=9495d1912ef3492e95e834ad0dab8dc8&culture=1033&uiculture=1033&reportstack=1&optype=export&filename=&contentdisposition=onlyhtmlinline&format=", "printframereportviewer", "\/reserved.reportviewerwebcontrol.axd?mode=true&reportid=c1c1698c78c7476b8a04e03424d3a36c&controlid=9495d1912ef3492e95e834ad0dab8dc8&culture=1033&uiculture=1033&reportstack=1&optype=printhtml", "reportviewer_ctl07", "reportviewer_ctl00", "reportviewer_ctl08"); document.getelementbyid('reportviewer').clientcontroller.postbackaction = function(actiontype, actionparam) { document.getelementbyid("reportviewer_ctl04").value = actiontype; document.getelementbyid("reportviewer_ctl05").value = actionparam; __dopostback('reportviewer',''); }; } --></script><input type="hidden" name="reportviewer$ctl04" id="reportviewer_ctl04" /><input type="hidden" name="reportviewer$ctl05" id="reportviewer_ctl05" /><input type="hidden" name="reportviewer$ctl06" id="reportviewer_ctl06" value="0" /><input type="hidden" name="reportviewer$ctl07" id="reportviewer_ctl07" value="false" /><input type="hidden" name="reportviewer$ctl08" id="reportviewer_ctl08" value="false" /><noscript> your browser not support scripts or has been configured not allow scripts. </noscript><script language="javascript"><!-- document.getelementbyid('reportviewer').clientcontroller.customonreportloaded = function() {}; document.getelementbyid('reportviewer').clientcontroller.customonasyncpagechange = function() {}; document.getelementbyid('reportviewer').clientcontroller.customondocmapvisibilitychange = function() {}; document.getelementbyid('reportviewer').clientcontroller.customonpromptareavisibilitychange = function() {}; document.getelementbyid('reportviewer').clientcontroller.customonreloaddocmap = function() {}; --></script> </div><iframe name="reportviewertouchsession0" id="reportviewertouchsession0" onload="if (frames['reportviewertouchsession0'].location != 'javascript:\'\'') frames['reportviewertouchsession0'].location.replace('javascript:\'\'');" src="javascript:''" style="position:absolute;width:0;height:0;border-width:0;visibility:hidden;"> </iframe><script type="text/javascript"> settimeout("frames['reportviewertouchsession0'].location.replace('\\\/reserved.reportviewerwebcontrol.axd?mode=true&reportid=dd0df78cbe0d4c119d2af4e5a13a33b7&controlid=9495d1912ef3492e95e834ad0dab8dc8&culture=1033&uiculture=1033&reportstack=1&optype=sessionkeepalive&timermethod=keepalivemethodreportviewertouchsession0&cacheseed=' + encodeuricomponent(date()));", 0);function keepalivemethodreportviewertouchsession0() {settimeout("frames['reportviewertouchsession0'].location.replace('\\\/reserved.reportviewerwebcontrol.axd?mode=true&reportid=dd0df78cbe0d4c119d2af4e5a13a33b7&controlid=9495d1912ef3492e95e834ad0dab8dc8&culture=1033&uiculture=1033&reportstack=1&optype=sessionkeepalive&timermethod=keepalivemethodreportviewertouchsession0&cacheseed=' + encodeuricomponent(date()));", 1140000);} </script><script language="javascript"><!-- document.getelementbyid('reportviewer').clientcontroller.showinitialwaitframe(); --></script> <script type="text/javascript"> //<![cdata[ var theform = document.forms['form1']; if (!theform) { theform = document.form1; } function __dopostback(eventtarget, eventargument) { if (!theform.onsubmit || (theform.onsubmit() != false)) { theform.__eventtarget.value = eventtarget; theform.__eventargument.value = eventargument; theform.submit(); } } //]]> </script> </form> </body> </html>
in event else sees this, problem in how defined control on page. had set processingmode
attribute , worked champ.
<rsweb:reportviewer id="reportviewer" width="100%" enableviewstate="true" runat="server" processingmode="remote" />
hopefully else won't spend long did trying troubleshoot issue.
Comments
Post a Comment