Solved

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

Posted on 2006-06-19
6
1,487 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
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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