usa_dreamer2002
Feb 13th, 2006, 11:45 AM
I have a windows form with a report viewer and a report. What I would like to do is to connect to an Access database on a remote computer and display the report using VB.NET. I created the report, previewed it on the development computer and it works fine. Then I copied the report file it’s class file to the remote computer where the database is located (now having two copies, one on the solution folder and the remote report file) and changed the path for the data source in the viewer and it worked fine also. However, when I try to open the project from another computer in the network, I get an error:
“File or assembly name crystal decisions.windows.forms, or one of its dependencies not found”
I have tried the following from the form load event (the database has not password):
1.- Dim crystalreportbytype As New CrystalReportbytype
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
' Create a report document instance to hold the report
Dim myreport As New ReportDocument
' Load the report
myreport.Load("..\CrystalReportbytype.rpt")
2. - Me.CrystalReportViewer1.ReportSource = "..\CrystalReportbytype.rpt"
3. - Me.CrystalReportViewer1.ReportSource = Application.StartupPath & "\" & "CrystalReportbytype.rpt"
4. - Me.crystalreportviewer1.reportsource = \\acm1022\2151\rpt\CrystalReportbytype.rpt
I have also set the source directly from the viewer to the path in the remote computer but still get the same error.
Can anyone point me to the right direction or give me a sample code to get this work? I would really appreciate it.
“File or assembly name crystal decisions.windows.forms, or one of its dependencies not found”
I have tried the following from the form load event (the database has not password):
1.- Dim crystalreportbytype As New CrystalReportbytype
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
' Create a report document instance to hold the report
Dim myreport As New ReportDocument
' Load the report
myreport.Load("..\CrystalReportbytype.rpt")
2. - Me.CrystalReportViewer1.ReportSource = "..\CrystalReportbytype.rpt"
3. - Me.CrystalReportViewer1.ReportSource = Application.StartupPath & "\" & "CrystalReportbytype.rpt"
4. - Me.crystalreportviewer1.reportsource = \\acm1022\2151\rpt\CrystalReportbytype.rpt
I have also set the source directly from the viewer to the path in the remote computer but still get the same error.
Can anyone point me to the right direction or give me a sample code to get this work? I would really appreciate it.