Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: CrystalReportViewer.ExportReport() method Post Reply Post New Topic
Author Message
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Topic: CrystalReportViewer.ExportReport() method
    Posted: 25 Apr 2008 at 6:13am

Our .NET application is called by our own software application.

In VB6, we used the RDC.  We were able to use teh CRAXDRT.Report .Export method that would allow our end users select the export format (.xls, .pdf, .rpt, etc.) they wanted to export the report and select the destination to save it to.
 
In .NET, it looks like you have to pass the export type in vs having users choose it as it executes.  Is this true?  I think it is, but am just trying to confirm.
 
In the meantime, I am trying to use the CrystalDecisions.Windows.Forms.CyrstalReportViewer ExportReport() method.  I can get this to bring up the Windows dialog to allow the user to select a destination and export format type.  The problem I am running into is that after clicking the Save button, a Message Box pops up stating Export completed.  The focus, however, is not on this message box.  So, it appears as though my programs is 'hanging'.  the Message Box is minimized on the Start bar.  If I maximize it and press OK, my program continues on.
 
Is there any way to prevent this message box from appearing or pass in a 'click' to say OK to close the message box?
 
Or, does anyone know another way to allow the end user to select (at runtime) the export format they want for the report using the Crystal for .NET methods?
IP IP Logged
HairyMike
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 8
Quote HairyMike Replybullet Posted: 25 Apr 2008 at 6:31am
I would create a form to handle exporting.  Pass in a reference to the report being exported and let them pick the format and destination.  I'd use the 'ExportToDisk' method of the report object rather than the viewer.
 
Regards,
Mike
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.