Solved

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

Posted on 2006-06-19
6
1,450 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
Comment Utility
>>> 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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Author Comment

by:nicksbell
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for all your help, it was all very useful.

Nick
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
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 …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

7 Experts available now in Live!

Get 1:1 Help Now