Please help Crystal Reports Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

C# Windows Application.

I am creating a CR and them printing the report via the PrintToPrinter().
The problem is the CR that is created in the temp directory is not removed
after the application closes.

So I added the CR.Close() event after the print command.

Now the CR is removed from the temp dir however if the report is more than 2
pages in size it closes before it is done printing.

How can I:
Test to see if printing is done before closing report
Or
Set a flag to tell C# or CR not to close the report till its done printing

Thanks
 
Try using the "using" statement. I don't have a problem with the temp
reports.

using (ReportDocument doc = new ReportDocument()
{
doc.Load(@"c:\crystal.rpt");

doc.PrintToPrinter();

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top