Discussion:
Crystal Reports Load Error
(too old to reply)
Scooby Dog
2010-04-02 16:35:43 UTC
Permalink
Could somone help: I have written a ASP.NET app that allows users to run
Crystal Reports. The reports work great on my development machine but after
I published in on the production server the CR Viewer bar does not load.
Instead I get a "Submit Queery" label for all the crystal buttons ie:
(print, export last page, etc). Note: This page is running on a new Windows
Server 2008 64bit.




Here is a link to an image showing what is occuring

http://yfrog.com/3z28668894j




I have installed the following on the server.

1. Crystal Reports Basic Runtime for Visual Studio 2008 (x64)

2. Crystal Reports 2008 Runtime SP2

3. Crystal Reports for .NET FRamework 2.0 (x86)







This is the source that I am using to load the page.


Imports System.Data
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Partial Class PrintActiveInquiry
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Try
Dim conStr As String =
System.Configuration.ConfigurationManager.AppSettings("dbPurchInquiry")
Dim strReportPath As String =
Server.MapPath("~/Reports/ActiveInquirys.rpt")

Dim sqlConnection As New SqlConnection(conStr)
Dim Command As SqlCommand = New SqlCommand()
Command.Connection = sqlConnection
Command.CommandText = "usp_GetInquiryByID"
Command.CommandType = CommandType.StoredProcedure

Dim Parameter As SqlParameter = New SqlParameter("@intInqID",
CType(Request.QueryString("ID"), Integer))
Parameter.Direction = ParameterDirection.Input
Parameter.DbType = DbType.Int16

Command.Parameters.Add(Parameter)

Dim Adapter As SqlDataAdapter = New SqlDataAdapter(Command)
Dim ds As New dsInquiry
Adapter.Fill(ds, "Inquirys")

Dim cr As New ReportDocument

cr.Load(strReportPath)
cr.SetDataSource(ds.Tables("Inquirys"))
CrystalReportViewer1.ReportSource = cr
Catch ex As Exception
Util.LogError("Error Generating Report:" & "
***PrintActiveInquiry.aspx*** " & ex.Message & " " & ex.StackTrace.ToString,
GeneralConstants.REPORT_MSG)
End Try

End Sub
End Class







Thanks in advance for any help




Dave.
Dave L
2010-04-02 18:49:14 UTC
Permalink
To whom it may concern, I found a solution to the above problem. I hope
this helps someone else in the future.


Here the fix:


On the web server, copy the 'aspnet_client' folder from 'C:\Inetpub\wwwroot'
to 'C:\Inetpub\wwwroot\your-website-name'.
Post by Scooby Dog
Could somone help: I have written a ASP.NET app that allows users to run
Crystal Reports. The reports work great on my development machine but
after I published in on the production server the CR Viewer bar does not
load. Instead I get a "Submit Queery" label for all the crystal buttons
ie: (print, export last page, etc). Note: This page is running on a new
Windows Server 2008 64bit.
Here is a link to an image showing what is occuring
http://yfrog.com/3z28668894j
I have installed the following on the server.
1. Crystal Reports Basic Runtime for Visual Studio 2008 (x64)
2. Crystal Reports 2008 Runtime SP2
3. Crystal Reports for .NET FRamework 2.0 (x86)
This is the source that I am using to load the page.
Imports System.Data
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Partial Class PrintActiveInquiry
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Try
Dim conStr As String =
System.Configuration.ConfigurationManager.AppSettings("dbPurchInquiry")
Dim strReportPath As String =
Server.MapPath("~/Reports/ActiveInquirys.rpt")
Dim sqlConnection As New SqlConnection(conStr)
Dim Command As SqlCommand = New SqlCommand()
Command.Connection = sqlConnection
Command.CommandText = "usp_GetInquiryByID"
Command.CommandType = CommandType.StoredProcedure
CType(Request.QueryString("ID"), Integer))
Parameter.Direction = ParameterDirection.Input
Parameter.DbType = DbType.Int16
Command.Parameters.Add(Parameter)
Dim Adapter As SqlDataAdapter = New SqlDataAdapter(Command)
Dim ds As New dsInquiry
Adapter.Fill(ds, "Inquirys")
Dim cr As New ReportDocument
cr.Load(strReportPath)
cr.SetDataSource(ds.Tables("Inquirys"))
CrystalReportViewer1.ReportSource = cr
Catch ex As Exception
Util.LogError("Error Generating Report:" & "
***PrintActiveInquiry.aspx*** " & ex.Message & " " &
ex.StackTrace.ToString, GeneralConstants.REPORT_MSG)
End Try
End Sub
End Class
Thanks in advance for any help
Dave.
Loading...