I have a crystal report in which I am trying to create and view. When I try and run the report from a VB.Net app, I get the above error. Now I know that this is because the report can't be found. In my project, I have defined a "Report" directory where all my reports will go. My problem is I'm not sure how to define that location for the "rpt.Load(path)" statement. Here is what I have so far!
Code:Public Sub ClientListing() Try Dim rpt As ReportDocument = New ReportDocument Dim rptName As String = "\client_MasterListing.rpt" If client.SelectClient(True) Then rpt.Load(rptName) rpt.Database.Tables(0).SetDataSource(client.dsClients) frmReports.crViewer.ReportSource = rpt End If Catch ex As Exception MessageBox.Show(ex.Message, "System Message", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub




Reply With Quote