Show a message "Exporting" with "Report.ExportDocument"

Stimulsoft Reports.NET discussion
Post Reply
Milton Guevara
Posts: 53
Joined: Thu Aug 21, 2008 9:28 pm
Location: Peru

Show a message "Exporting" with "Report.ExportDocument"

Post by Milton Guevara »

Hello
I want to show a message "Exporting" at generating a TXT file with the "Report.ExportDocument" command
Any ideas how to do?

Milton
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Show a message "Exporting" with "Report.ExportDocument"

Post by Edward »

Hi Milton,

We will prepare a test application for you.

Thank you.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Show a message "Exporting" with "Report.ExportDocument"

Post by Vital »

Hello,

You can use following code:

Code: Select all

IStiProgressInformation progress = StiGuiOptions.GetProgressInformation(null);

using (BackgroundWorker worker = new BackgroundWorker())
{
         worker.WorkerSupportsCancellation = true;
         worker.DoWork += new DoWorkEventHandler(worker_DoWork);
         worker.RunWorkerAsync();

         progress.Start("Exporting");

         while (worker.IsBusy)
		Application.DoEvents();

         progress.Close();
}


private void worker_DoWork(object sender, DoWorkEventArgs e)
{
      service.ExportDocument(StiExportFormat.Pdf, "test.pdf");
}
Thank you.
Milton Guevara
Posts: 53
Joined: Thu Aug 21, 2008 9:28 pm
Location: Peru

Show a message "Exporting" with "Report.ExportDocument"

Post by Milton Guevara »

Thank you very much, it was perfect.

Milton
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Show a message "Exporting" with "Report.ExportDocument"

Post by Edward »

Hi Milton,

Please let us know if any additional help is required.

Thank you.
Post Reply