Request is not available in this context
Posted: Thu Mar 07, 2013 6:14 pm
Hello.
After finding that the StiWebViewer toolbar options do not work inside an update panel, I read that it might be possible to use ajax to load the report.
I initialise the viewer with this:
I created a web method to run the report, and used jquery ajax to post to the web method, and it works fine up until I hit this line of code:
This causes the following exception:
I wonder if you could tell me if it is possible to load a report using ajax only (so not requiring a page reload)? If there is a way to get it working inside an update panel, then this would also be fine.
Cheers,
Josh.
After finding that the StiWebViewer toolbar options do not work inside an update panel, I read that it might be possible to use ajax to load the report.
I initialise the viewer with this:
Code: Select all
<Sti:StiWebViewer ID="viewer" runat="server" Theme="Office2010" CacheMode="Page" RenderMode="AjaxWithCache" />
Code: Select all
this.viewer.ProcessReport();
Code: Select all
Message":"Request is not available in this context",
"StackTrace":" at System.Web.UI.Page.get_Request()
at Stimulsoft.Report.Web.StiWebViewer.GetApplicationUrl(Boolean addQuerySeparator)
at Stimulsoft.Report.Web.StiWebViewer.GetApplicationUrl()
at Stimulsoft.Report.Web.StiWebViewer.GetSessionId()
at Stimulsoft.Report.Web.StiWebViewer.get_ViewMode()
at Stimulsoft.Report.Web.StiWebViewer.RenderReport(StiReport report)
at Stimulsoft.Report.Web.StiWebViewer.ProcessReport()
at Stimulsoft.Report.Web.StiWebViewer.set_Report(StiReport value)
at Application.Reports.LoadReport(StiReport report) in Reports.aspx.cs:line 91
at Application.Reports.RunReport(Int32 reportID) in ReportsPresenter.cs:line 143
at Application.Reports.RunReport(Int32 reportID) in Reports.aspx.cs:line 176",
"ExceptionType":"System.Web.HttpException"
Cheers,
Josh.