Skip to Content
avatar image
Former Member

Crystal Report Viewer Export to Excel always shows previous report.

Hi, I'm developing a C# ASP.Net 2.0 web application running in IE 6.0 on Windows XP. The problem I have, in a nutshell:

1. The user selects a report from a list, and chooses run report, which opens the report on a web page, using the CrystalReportViewer object. They then choose to export the report, using the built in pop-up, and choose to export (and open) to Excel.

2. The user views/prints/whatever they want to do, and then closes the browser window that has been opened by the export method.

3. The user navigates back to the report list, chooses and runs a different report.

4. The user again chooses to export and open this report in Excel. However, the new window will show the report opened in step 1.

The only way I've found around this, once I've closed the window containing the report in Excel, is to go to task manager and kill off the Excel.exe process. However, this is not a safe or reasonable approach to use via code. The report object is fully disposed of when the user leaves the report screen, but it doesn't seem to close down the excel process.

Any ideas, or help?

Cheers,

Dave

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 02, 2008 at 07:00 PM

    Exporting from the button on the CR viewer should not be spawning the excel.exe, so that is confusing...

    Try the simple viewer app from this download:

    https://smpdl.sap-ag.de/~sapidp/012002523100006252712008E/csharp_web_smpl.exe

    and see if that duplicates the issue for you.

    Ludek

    Add comment
    10|10000 characters needed characters exceeded