Results 1 to 6 of 6

Thread: Crystal Reports : How to close database connection? Plz Hlp!

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    14

    Smile Crystal Reports : How to close database connection? Plz Hlp!

    Hi !

    I am using CrystalReportViewer to display the report using VB.NET inbuilt crystal report. The problem is every time a report is displaying, it is opening its own connection. How to close this connection once the user is through with the report.

    Here is the Code:
    =========================================================
    Public Sub ShowReport(ByVal ReportFileName As String)
    Try
    Me._ReportName = ReportFileName
    path = Application.StartupPath
    oRpt.Load(path & ReportFileName) ' oRpt is report document
    CrystalReportViewer1.ReportSource = oRpt
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    End Sub
    =========================================================

    Thanks,

    Last edited by vishesh_marwah; Dec 23rd, 2006 at 06:59 AM.

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