Solved

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

Posted on 2006-06-19
6
1,469 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now