Here are the tools that i'm using:
Visual Studio .Net 2003
Crystal Report 8.5
OS: Windows XP
I have developed a visual basic application running in windows xp. My program works fine, all reports will appear. But when I installed my program in windows 7, I got this error "Load report failed." during viewing of reports.
Any idea will greatly appreciated. Thank you so much.
Here's my code:
Visual Studio .Net 2003
Crystal Report 8.5
OS: Windows XP
I have developed a visual basic application running in windows xp. My program works fine, all reports will appear. But when I installed my program in windows 7, I got this error "Load report failed." during viewing of reports.
Any idea will greatly appreciated. Thank you so much.
Here's my code:
Code:
Try oRPT = New ReportDocument sReportDir = Application.StartupPath + "\Rpt" sReportDir = sReportDir.Replace("\", "\\") sReportDir = Trim(sReportDir) + "\\rptInventoryReport2.rpt" oRPT.Load(sReportDir) With crConnectionInfo .ServerName = sSQLServer .DatabaseName = sDB .UserID = sSA .Password = sSApass End With Pause(3) crTables = oRPT.Database.Tables crtableLogoninfo.ConnectionInfo = crConnectionInfo crTables.Item("vw_Inventory2").ApplyLogOnInfo(crtableLogoninfo) crTables.Item("vw_Inventory2").Location = sDB + ".dbo.vw_Inventory2" oRPT.SetParameterValue("pDate", Trim(frmInventoryItems.txtFilterDate.Text)) oRPT.SetParameterValue("Employee", Trim(sEmployeeName)) ReportViewer.ReportSource = oRPT ReportViewer.RefreshReport() Catch ex As Exception MsgBox(ex.Message) End Try
Comment