Results 1 to 2 of 2

Thread: How to clear the reference of report document?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    478

    How to clear the reference of report document?

    I used code below to export Crystal Report to file server but got "reach max print job" error.

    How to clear the reference of report document? After rpt.Export(), adding rpt.close() and rpt.dispose() is ok?

    Code:
    Dim CrExportOptions As ExportOptions
    
    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
    
    Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()
    CrDiskFileDestinationOptions.DiskFileName = DISKFILENAME & sMembID & ".pdf"
    CrExportOptions = rpt.ExportOptions
    With CrExportOptions
    .ExportDestinationType = ExportDestinationType.DiskFile
    .ExportFormatType = ExportFormatType.PortableDocFormat
    .DestinationOptions = CrDiskFileDestinationOptions
    .FormatOptions = CrFormatTypeOptions
    End With
    rpt.Export()
    Last edited by gep13; Oct 30th, 2013 at 04:26 PM. Reason: Added code tags

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to clear the reference of report document?

    Hello,

    I am not too familiar with Crystal Reports, but does this help:

    http://geekswithblogs.net/technetbyt...17/114008.aspx

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width