views:

86

answers:

0

I have a Sub like this:

Public Sub ReportViewer(ByVal ReportName As String, ByVal SQLText As String)  
    Dim strReportPath As String = System.AppDomain.CurrentDomain.BaseDirectory() & "Report\" & ReportName & ".rpt"  
    If Not IO.File.Exists(strReportPath) Then  
        MsgBox("Unable to locate report file", MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "File not Found")  
        Exit Sub  
    End If  

    Dim DA As New OleDbDataAdapter(SQLText, ReportConnection)  
    Dim DS As New DataSet  
    Dim cr As New CrystalDecisions.CrystalReports.Engine.ReportDocument  

    DA.Fill(DS, ReportName)  
    cr.Load(strReportPath)  
    cr.SetDataSource(DS.Tables(ReportName))  

    With frmReport
        .WindowState = FormWindowState.Maximized  
        .ShowIcon = False  
        With .CrpReportViewer  
            .ReportSource = Nothing  
            .ReportSource = cr  
            .Refresh()  
            .Zoom(100)  
        End With  
        .Show()  
    End With  
End Sub 

When I want to see the report based on ONLY one table then all is OK for me. BUT when there is more than one table, it shows an Authentication Box asking the password. Please tell me how can show the report without showing the password box? (My Database is in Oracle 10g)

Thanks in Advance.