Hi all,
I have received the following error message when tring to load a report which is accessing data over a network from sql server.
The table " could not be found.
Here is the code to try and access a number of reports;
Any help is much appreciated.
Thanks
Private Sub btnRunReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRunReport.Click
Try
MyBase.Cursor = Cursors.WaitCursor
If Me.cboReports.SelectedIndex = 0 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\1.rpt"
ElseIf Me.cboReports.SelectedIndex = 1 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\2.rpt"
ElseIf Me.cboReports.SelectedIndex = 2 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\L3.rpt"
ElseIf Me.cboReports.SelectedIndex = 3 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\4.rpt"
ElseIf Me.cboReports.SelectedIndex = 4 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\5.rpt"
ElseIf Me.cboReports.SelectedIndex = 5 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\6.rpt"
ElseIf Me.cboReports.SelectedIndex = 6 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\7.rpt"
End If
'MsgBox("Please load pre-printed stationary into the printer.")
crvReports.PrintReport()
crvReports.RefreshReport()
MyBase.Cursor = Cursors.Arrow
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End ClassOpen the report and do verify database and make sure it is pointing to the correct databasesql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment