Md Mushtaque

Md Mushtaque

  • NA
  • 25
  • 0

Your Suggestion highly appreciated

Aug 6 2008 4:03 AM

Hi Programmers and Developers,

Please go through the given matter and post your suggestions or mail me in [email protected]

On calling the report I am getting this info first. How to get the report directly without appearing of this screen.

For setting the database connection I have written the following code:

Sub setDBConnection(ByVal rName As String)

        Dim crDatabase As CrystalDecisions.CrystalReports.Engine.Database
        Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
        Dim dbConn As TableLogOnInfo = New TableLogOnInfo
        Dim oRpt As ReportDocument = New ReportDocument
        Dim arrTables As Object() = New Object(0) {}
        ReDim arrTables(2)
        oRpt.Load(rName)
        crDatabase = oRpt.Database
        crDatabase.Tables.CopyTo(arrTables, 0)

        crTable = DirectCast(arrTables(0), CrystalDecisions.CrystalReports.Engine.Table)
        dbConn = crTable.LogOnInfo
        dbConn.ConnectionInfo.DatabaseName = "MyDatabase"
        dbConn.ConnectionInfo.ServerName = "MyServer"
        dbConn.ConnectionInfo.UserID = "MyUser"
        dbConn.ConnectionInfo.Password = "MyPwd"
        crTable.ApplyLogOnInfo(dbConn)

        myCrystalReportViewer.ReportSource = oRpt
    End Sub

 The report you requested requires further information.


  technova
Server name: 
Database name: 
User name: 
Password: