calling GetReportSnapshotResult OUTSIDE of getResultSnapshot

Stimulsoft Reports.WEB discussion
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

calling GetReportSnapshotResult OUTSIDE of getResultSnapshot

Post by brianj774 »

Hi,

I'm wondering if its possible to call

StiMvcViewer.GetReportSnapshotResult(HttpContext, report);

From the controller action method that generates the view with the stimulsoft control on it. My goal is to be able to use the size of the stringData field to generate a dynamic "ConnectionClientRequestTimeout" value (ie, small for smallish datasets, and large, for larger ones).

Right now, I have some clients with enormous datasets, pulling an entire months worth of data, and it hits my ConnectionClientRequestTimeout limit, while my smaller clients can pull 3 years worth of data without concern. I'd like to be able to tailor the ConnectionClientRequestTimeout to the specific report they are generating.

However, when I try the above, I get a "yellow screen of death", as follows shortly. The exact same line of code operates without issue in the GetReportSnapshot() action. Additionally, both the HttpContext and the report objects are in existence, and both appear to be reasonably setup. My only guess is that GetReportSnapshot() somehow has additional info in the HttpContext that is missing from the Primary action method's.


============================================================================
Server Error in '/Portal' Application.
Value cannot be null.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: value

Source Error:


Line 295:
Line 296:
Line 297: var doc = StiMvcViewer.GetReportSnapshotResult(httpCtx, report);
Line 298:
Line 299: //find the size of the report


Source File: C:\Work\Webstore\ws_trunk\tmpFlex_RenameMe\RevTrakPortal\RevTrakPortal\Controllers\ReportController.cs Line: 297

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.EnumResult.SetFailure(ParseFailureKind failure, String failureParameter) +4058055
System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) +9627263
System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) +80
Stimulsoft.Report.Mvc.StiMvcViewer.SaveReportObject(HttpContextBase httpContext, StiReport report) +94
Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapshotResult(HttpContextBase httpContext, StiReport report) +18
RevTrakPortal.Controllers.ReportController.Render(Int32 id, Boolean edit, Boolean dup) in C:\Work\Webstore\ws_trunk\tmpFlex_RenameMe\RevTrakPortal\RevTrakPortal\Controllers\ReportController.cs:297
lambda_method(Closure , ControllerBase , Object[] ) +194
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +205
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +50
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +50
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +126
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +45
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +61
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +49
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +49
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9042429
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by brianj774 »

rightnow, the best approach I have is to do a serialize of the populated datatable object, and get its length....this returns a number (1,200,000 bytes). but when I examine firefox, the same dataset is only 200,000 bytes. (evidently, I have some extra data in my datatable, that isn't getting presented on the report).

How can I get a better estimate of how many bytes actually NEED to be delivered to the client?
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by brianj774 »

Well, I've narrowed down my problem set, somewhat, and I no longer really need the SIZE of the element returned. I have verified that server side compression is on, and that there are no delays in transmitting the data that are significant.

However, what I discovered still requires assistance. I wrapped a timer around the call to GetReportSnapshotResult (from in the GetReportSnapshot action, NOT the Primary action, as with the initial post in this thread).... I am finding that all the delays I've been fighting against originate here. the call to StiMvcViewer.GetReportSnapshotResult() is taking a very large amount of time. This is not wholly unexpected, as I am generating a detail report containing a full years worth of data. It should take long.

The problem is that I don't know what to do to present this data to the user. I am still in need of some way to estimate the amount of time the user will be waiting, or, even better, to present them with some kind of progress indicator. Its okay that a report takes multiple minutes to generate, but I need some way to inform the user that they should keep waiting on us. As things stand, the only tool I have is a 'clientTimout' variable, which, unless I can calculate the estimated duration of the initial load, is completely useless to me...eventually a large enough client will run a report with a too large dataset, and they'll get a timeout. Or, I can set the timeout to some ridiculous number, like 24 hours....

What can be done to further this need?
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by brianj774 »

Well, I've now discovered the StiReport.Render() method, and this gives me the ability to pre-render the report, before the timeout from the stimulsoft reporting chrome....

But, I still am looking for a way to provide some kind of feedback to my users about the delay in presenting the report.... any ideas?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by Vladimir »

Hello,

If we understand you correctly, you want to display the report generation progress in the viewer.
We agree, this is necessary option. We analyze the situation, how quickly it can be done, and let you know.

Thank you.
mzwigl
Posts: 5
Joined: Fri Nov 22, 2013 12:07 pm
Location: Austria

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by mzwigl »

Woha. I am getting the same error.

The way I use it is to distille a nHibernate Query via Link into ICollection<>.
The data looks fine to me. I also took some care that really everything is fetched and within my repository.
Registering the data on report and synchronization seems fine, but then it crashes with the same Stacktrace.

Any news on this one?
Martin
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by brianj774 »

for me, the issue was resolved by calling stiReport.Render(), instead of GetReportSnapshotResult() in the primary controller action. I believe there are some values placed into the httpContext via the POST to the GetReportSnapshot() callback method (or the other interaction event methods), that are required for GetReportSnapshotResult() to function properly.
mzwigl
Posts: 5
Joined: Fri Nov 22, 2013 12:07 pm
Location: Austria

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by mzwigl »

Hmm. Thx for the tip.
With my current example I need it within the POST request.
Anybody from dev-team? Which parameters in the report that require an enum am I missing? When I "just" render the report, no exception is thrown, but no report data is shown in the viewer.

Happy Weekend,
m
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by Vladimir »

Hello,

Please send us the keys/values of the httpContext.Request.Params collection, when an error occurs. In this collection viewer sends the required parameters to load the report from the server cache.

Thank you.
mzwigl
Posts: 5
Joined: Fri Nov 22, 2013 12:07 pm
Location: Austria

Re: calling GetReportSnapshotResult OUTSIDE of getResultSnap

Post by mzwigl »

Hi there.

This format ok?

+ (HttpContext.Request).Params {simpleReportSince=29.08.2013&ASP.NET_SessionId=o0b0qmwsmj5icgfyrikjqcha&__RequestVerificationToken=lWhXQMdc-foCFu--iEDbTHP7S0me3zRSrXy59zFVkE1v0f-HZ2ubugUuO2SVL45Jo1KnIl0N2mVnYq0uuxMisYbZo5TGtNyhD-CtgQsqhLM1&.ASPXAUTH=259530CA990604AD7DEC2EE227F9E4220A58F4DAAB0D1DCE9876E0639D2720FE8B88EDBBEDDA9949FB0465B129EF547B92FEA64D1E92981EC9806543BC32873C90961EE9D848D8B0B9F369C9EE921EBF06B611CCC722E2942E2A688B2CD675CC&.ASPXROLES=0SCvbDsg1x_g_BbUMtyj5maJIaF7ZeidH_QTEc0uRCh8OmDrMH5unZEcmm_IKJ11P-ZCfqMYrClShp3rYY4vyC6aHUgMIQ63-K472cs3UDMdoRc_XsT0Ax1RSaFxHk07O3jKLXR8vV2Y-MHvJBJFFBsldZ70kB81V5w7FytThXXkVVEbSLuqgQ_XthpqbXmQ8idRR7H1vW43vYXkHayIDUqR6oH7Zt_23Heqk16MZ2BAbREkc10BHvekrxGkI2NgXQoaiQF-ulX7PT8UiSdq7-cArzkbbJBe6akdX5J0QFccUPU0i8ypgVJmBT4nda8NgF89YxN1Ut1_ObIvF3oqBSo_W0ELUQuoWvAcy5HgYRnjdYB4c1Lyg9YWH5v4lFvlRo4D0xtNF65YISRWQdUcK9L5kQ8nmva6ZkHqmAuCJ2VKOh3POvN8cXESjFQTQKiFo_SMhdQgb0ZEMYRY9IPSPKfhBBaQhnfOEPxLtIAh99-KhyJb2eIv77cbJY4bJ41J0&ALL_HTTP=HTTP_CONNECTION%3akeep-alive%0d%0aHTTP_CONTENT_LENGTH%3a28%0d%0aHTTP_CONTENT_TYPE%3aapplication%2fx-www-form-urlencoded%0d%0aHTTP_ACCEPT%3atext%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2c*%2f*%3bq%3d0.8%0d%0aHTTP_ACCEPT_ENCODING%3agzip%2c+deflate%0d%0aHTTP_ACCEPT_LANGUAGE%3ade-de%2cde%3bq%3d0.8%2cen-us%3bq%3d0.5%2cen%3bq%3d0.3%0d%0aHTTP_COOKIE%3aASP.NET_SessionId%3do0b0qmwsmj5icgfyrikjqcha%3b+__RequestVerificationToken%3dlWhXQMdc-foCFu--iEDbTHP7S0me3zRSrXy59zFVkE1v0f-HZ2ubugUuO2SVL45Jo1KnIl0N2mVnYq0uuxMisYbZo5TGtNyhD-CtgQsqhLM1%3b+.ASPXAUTH%3d259530CA990604AD7DEC2EE227F9E4220A58F4DAAB0D1DCE9876E0639D2720FE8B88EDBBEDDA9949FB0465B129EF547B92FEA64D1E92981EC9806543BC32873C90961EE9D848D8B0B9F369C9EE921EBF06B611CCC722E2942E2A688B2CD675CC%3b+.ASPXROLES%3d0SCvbDsg1x_g_BbUMtyj5maJIaF7ZeidH_QTEc0uRCh8OmDrMH5unZEcmm_IKJ11P-ZCfqMYrClShp3rYY4vyC6aHUgMIQ63-K472cs3UDMdoRc_XsT0Ax1RSaFxHk07O3jKLXR8vV2Y-MHvJBJFFBsldZ70kB81V5w7FytThXXkVVEbSLuqgQ_XthpqbXmQ8idRR7H1vW43vYXkHayIDUqR6oH7Zt_23Heqk16MZ2BAbREkc10BHvekrxGkI2NgXQoaiQF-ulX7PT8UiSdq7-cArzkbbJBe6akdX5J0QFccUPU0i8ypgVJmBT4nda8NgF89YxN1Ut1_ObIvF3oqBSo_W0ELUQuoWvAcy5HgYRnjdYB4c1Lyg9YWH5v4lFvlRo4D0xtNF65YISRWQdUcK9L5kQ8nmva6ZkHqmAuCJ2VKOh3POvN8cXESjFQTQKiFo_SMhdQgb0ZEMYRY9IPSPKfhBBaQhnfOEPxLtIAh99-KhyJb2eIv77cbJY4bJ41J0%0d%0aHTTP_HOST%3alocalhost%3a62975%0d%0aHTTP_REFERER%3ahttp%3a%2f%2flocalhost%3a62975%2fReporting%2fStatistics%0d%0aHTTP_USER_AGENT%3aMozilla%2f5.0+(Windows+NT+6.1%3b+WOW64%3b+rv%3a25.0)+Gecko%2f20100101+Firefox%2f25.0%0d%0a&ALL_RAW=Connection%3a+keep-alive%0d%0aContent-Length%3a+28%0d%0aContent-Type%3a+application%2fx-www-form-urlencoded%0d%0aAccept%3a+text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2c*%2f*%3bq%3d0.8%0d%0aAccept-Encoding%3a+gzip%2c+deflate%0d%0aAccept-Language%3a+de-de%2cde%3bq%3d0.8%2cen-us%3bq%3d0.5%2cen%3bq%3d0.3%0d%0aCookie%3a+ASP.NET_SessionId%3do0b0qmwsmj5icgfyrikjqcha%3b+__RequestVerificationToken%3dlWhXQMdc-foCFu--iEDbTHP7S0me3zRSrXy59zFVkE1v0f-HZ2ubugUuO2SVL45Jo1KnIl0N2mVnYq0uuxMisYbZo5TGtNyhD-CtgQsqhLM1%3b+.ASPXAUTH%3d259530CA990604AD7DEC2EE227F9E4220A58F4DAAB0D1DCE9876E0639D2720FE8B88EDBBEDDA9949FB0465B129EF547B92FEA64D1E92981EC9806543BC32873C90961EE9D848D8B0B9F369C9EE921EBF06B611CCC722E2942E2A688B2CD675CC%3b+.ASPXROLES%3d0SCvbDsg1x_g_BbUMtyj5maJIaF7ZeidH_QTEc0uRCh8OmDrMH5unZEcmm_IKJ11P-ZCfqMYrClShp3rYY4vyC6aHUgMIQ63-K472cs3UDMdoRc_XsT0Ax1RSaFxHk07O3jKLXR8vV2Y-MHvJBJFFBsldZ70kB81V5w7FytThXXkVVEbSLuqgQ_XthpqbXmQ8idRR7H1vW43vYXkHayIDUqR6oH7Zt_23Heqk16MZ2BAbREkc10BHvekrxGkI2NgXQoaiQF-ulX7PT8UiSdq7-cArzkbbJBe6akdX5J0QFccUPU0i8ypgVJmBT4nda8NgF89YxN1Ut1_ObIvF3oqBSo_W0ELUQuoWvAcy5HgYRnjdYB4c1Lyg9YWH5v4lFvlRo4D0xtNF65YISRWQdUcK9L5kQ8nmva6ZkHqmAuCJ2VKOh3POvN8cXESjFQTQKiFo_SMhdQgb0ZEMYRY9IPSPKfhBBaQhnfOEPxLtIAh99-KhyJb2eIv77cbJY4bJ41J0%0d%0aHost%3a+localhost%3a62975%0d%0aReferer%3a+http%3a%2f%2flocalhost%3a62975%2fReporting%2fStatistics%0d%0aUser-Agent%3a+Mozilla%2f5.0+(Windows+NT+6.1%3b+WOW64%3b+rv%3a25.0)+Gecko%2f20100101+Firefox%2f25.0%0d%0a&APPL_MD_PATH=&APPL_PHYSICAL_PATH=C%3a%5cDevelopment%5clinz-tfs1%5cProjectX%5cCommunicationHub%5cBranches%5cMain%5cWebroot.ProjectX.MgmtConsole%5c&AUTH_TYPE=Forms&AUTH_USER=admin&AUTH_PASSWORD=&LOGON_USER=MZWIG-DESK%5csetupAdmin&REMOTE_USER=admin&CERT_COOKIE=&CERT_FLAGS=&CERT_ISSUER=&CERT_KEYSIZE=&CERT_SECRETKEYSIZE=&CERT_SERIALNUMBER=&CERT_SERVER_ISSUER=&CERT_SERVER_SUBJECT=&CERT_SUBJECT=&CONTENT_LENGTH=28&CONTENT_TYPE=application%2fx-www-form-urlencoded&GATEWAY_INTERFACE=&HTTPS=&HTTPS_KEYSIZE=&HTTPS_SECRETKEYSIZE=&HTTPS_SERVER_ISSUER=&HTTPS_SERVER_SUBJECT=&INSTANCE_ID=&INSTANCE_META_PATH=&LOCAL_ADDR=127.0.0.1&PATH_INFO=%2fReporting%2fSimpleReportGo&PATH_TRANSLATED=C%3a%5cDevelopment%5clinz-tfs1%5cProjectX%5cCommunicationHub%5cBranches%5cMain%5cWebroot.ProjectX.MgmtConsole%5cReporting%5cSimpleReportGo&QUERY_STRING=&REMOTE_ADDR=127.0.0.1&REMOTE_HOST=127.0.0.1&REMOTE_PORT=&REQUEST_METHOD=POST&SCRIPT_NAME=%2fReporting%2fSimpleReportGo&SERVER_NAME=localhost&SERVER_PORT=62975&SERVER_PORT_SECURE=0&SERVER_PROTOCOL=HTTP%2f1.1&SERVER_SOFTWARE=&URL=%2fReporting%2fSimpleReportGo&HTTP_CONNECTION=keep-alive&HTTP_CONTENT_LENGTH=28&HTTP_CONTENT_TYPE=application%2fx-www-form-urlencoded&HTTP_ACCEPT=text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2c*%2f*%3bq%3d0.8&HTTP_ACCEPT_ENCODING=gzip%2c+deflate&HTTP_ACCEPT_LANGUAGE=de-de%2cde%3bq%3d0.8%2cen-us%3bq%3d0.5%2cen%3bq%3d0.3&HTTP_COOKIE=ASP.NET_SessionId%3do0b0qmwsmj5icgfyrikjqcha%3b+__RequestVerificationToken%3dlWhXQMdc-foCFu--iEDbTHP7S0me3zRSrXy59zFVkE1v0f-HZ2ubugUuO2SVL45Jo1KnIl0N2mVnYq0uuxMisYbZo5TGtNyhD-CtgQsqhLM1%3b+.ASPXAUTH%3d259530CA990604AD7DEC2EE227F9E4220A58F4DAAB0D1DCE9876E0639D2720FE8B88EDBBEDDA9949FB0465B129EF547B92FEA64D1E92981EC9806543BC32873C90961EE9D848D8B0B9F369C9EE921EBF06B611CCC722E2942E2A688B2CD675CC%3b+.ASPXROLES%3d0SCvbDsg1x_g_BbUMtyj5maJIaF7ZeidH_QTEc0uRCh8OmDrMH5unZEcmm_IKJ11P-ZCfqMYrClShp3rYY4vyC6aHUgMIQ63-K472cs3UDMdoRc_XsT0Ax1RSaFxHk07O3jKLXR8vV2Y-MHvJBJFFBsldZ70kB81V5w7FytThXXkVVEbSLuqgQ_XthpqbXmQ8idRR7H1vW43vYXkHayIDUqR6oH7Zt_23Heqk16MZ2BAbREkc10BHvekrxGkI2NgXQoaiQF-ulX7PT8UiSdq7-cArzkbbJBe6akdX5J0QFccUPU0i8ypgVJmBT4nda8NgF89YxN1Ut1_ObIvF3oqBSo_W0ELUQuoWvAcy5HgYRnjdYB4c1Lyg9YWH5v4lFvlRo4D0xtNF65YISRWQdUcK9L5kQ8nmva6ZkHqmAuCJ2VKOh3POvN8cXESjFQTQKiFo_SMhdQgb0ZEMYRY9IPSPKfhBBaQhnfOEPxLtIAh99-KhyJb2eIv77cbJY4bJ41J0&HTTP_HOST=localhost%3a62975&HTTP_REFERER=http%3a%2f%2flocalhost%3a62975%2fReporting%2fStatistics&HTTP_USER_AGENT=Mozilla%2f5.0+(Windows+NT+6.1%3b+WOW64%3b+rv%3a25.0)+Gecko%2f20100101+Firefox%2f25.0} System.Collections.Specialized.NameValueCollection {System.Web.HttpValueCollection}

M
Post Reply