By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,963 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,963 IT Pros & Developers. It's quick & easy.

Why is that my reports won't load in Windows 7 but in Windows XP I got no problem?

P: 2
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:

Expand|Select|Wrap|Line Numbers
  1. Try
  2.             oRPT = New ReportDocument
  3.             sReportDir = Application.StartupPath + "\Rpt"
  4.             sReportDir = sReportDir.Replace("\", "\\")
  5.             sReportDir = Trim(sReportDir) + "\\rptInventoryReport2.rpt"
  6.             oRPT.Load(sReportDir)
  7.             With crConnectionInfo
  8.                 .ServerName = sSQLServer
  9.                 .DatabaseName = sDB
  10.                 .UserID = sSA
  11.                 .Password = sSApass
  12.             End With
  13.             Pause(3)
  14.             crTables = oRPT.Database.Tables
  15.             crtableLogoninfo.ConnectionInfo = crConnectionInfo
  16.         crTables.Item("vw_Inventory2").ApplyLogOnInfo(crtableLogoninfo)
  17.             crTables.Item("vw_Inventory2").Location = sDB + ".dbo.vw_Inventory2"
  18.  
  19.             oRPT.SetParameterValue("pDate", Trim(frmInventoryItems.txtFilterDate.Text))
  20.             oRPT.SetParameterValue("Employee", Trim(sEmployeeName))
  21.  
  22.             ReportViewer.ReportSource = oRPT
  23.             ReportViewer.RefreshReport()
  24.  
  25.         Catch ex As Exception
  26.             MsgBox(ex.Message)
  27.         End Try
  28.  
Sep 22 '10 #1
Share this Question
Share on Google+
3 Replies


100+
P: 110
Does upgrading to .Net 2005 help? vs 2003 .net isn't supported anymore and is widely known as a failure.

I would have a .Net 1.1 legacy version, and .NET 2.0 version (at least 2.0) if this fixes the issue.

I also know things like the JET driver has been depreciated. So maybe something like that has been updated within the reporting framework to support Windows 7 by version 2.0. May have to try 3.5, too?
Sep 27 '10 #2

P: 2
Thank you so much for the idea TamusJRoyce.
Sep 28 '10 #3

P: 2
Maybe the problem lies on the different IIS version.
Windows XP using IIS 6 and Windows 7 using IIS 7.

Maybe you can try this :
1. Make sure you add permission to windows temporary folder depend on your IIS user
2. Install the right redistributable crystal report version
3. Changing identity on app pool to 'Network Services'

Reference : Crystal Report Load Report Failed when deployed in IIS

hope this helps.
May 19 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.