Solved

Invalid report file path after not viewing a report for a while

Posted on 2006-06-19
6
1,524 Views
Last Modified: 2008-01-09
Hi, I have an ASP.Net app using VB.Net and Crystal Reports v10.  I have a page that displays a crystal report within a form (named frmReport) with runat="server" set.  The report works fine when I first navigate to the page, and is refreshed OK when ReportRefresh is called by the user selecting the Refresh button.  The problem I am having is that if I leave the page open and return to the report after a while and click the Refresh button I get an 'Invalid report file path' error when the reportdocument.Refresh is called in the ReportRefresh event.

It it possible that something is timing out, possibly something to do with the reportdocument or the frmReport?

Thanks
0
Comment
Question by:nicksbell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 16934767
>>> It it possible that something is timing out

Yes.  I suspect that the session state is timing out - by default IIS has a 20 minute timeout  for sessions so after that period of activity the server drops the state.  When the client sends a request the server no longer has the corresponding information.  In this case the server probably stores the path to a temporary report file and when the session is dropped so is the temp file.

You can increase the timeout period in IIS, but that can have major performance implications for your server so that isn't something to do lightly.

frodoman
0
 
LVL 2

Author Comment

by:nicksbell
ID: 16934787
Is it possible to reestablish the state in the vb.code.  i.e. is it possible for me to trap the invalid report file path error and then refresh/renew/reload the whole page?  If so how would I do that?

NB
0
 
LVL 42

Expert Comment

by:frodoman
ID: 16934933
It isn't possible to reestablish the state.  It is possible to wrap your code in a TRY..CATCH block and trap for that error.  What you'd probably want to do is if you encounter that error, redirect to a static page that explains the user's session has timed out.  On that page you can have a link that takes them back to the report (which will be treated as the first hit on the page and will reload as a new page instead of trying to refresh expired content).

Depending on your app, you may need the link to redirect to a login page, etc. instead of directlyl to the report - that just depends on how your application works.

frodoman
0
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

 
LVL 2

Author Comment

by:nicksbell
ID: 16935284
ok, thanks.  As another suggestion, rather then increasing the internet explorer timeout, is it possible for the webpage to send a 'keep alive' signal back to the server so I can control which pages don't timeout?

0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 16935666
Yes, that's possible.  You just need to add a meta tag to the HTML on your page.  This will auto-refresh every 10 minutes, for example:  <META http-equiv="Refresh" content="10">

Keep in mind that this is the same as the user clicking the refresh button on their browser - so it may not refresh back to the same page on the report, but more likely will recreate the report from scratch.

Also you might be interested in this - prompting user before session expires: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21740156.html

Maybe you'll want to combine the two solutions.  Prompt the user at one interval but if they still haven't responded have your auto-refresh interval set to just less than your IIS timeout.  Also note that the timeout can be specified in your web.config file.  From my understanding though this can be shorter than the IIS setting but if you make it longer then the IIS setting will still be used.

frodoman
0
 
LVL 2

Author Comment

by:nicksbell
ID: 16937956
Thanks for all your help, it was all very useful.

Nick
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question