Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After moving app from local to web server, crystal report not work

Status
Not open for further replies.

adonet

MIS
May 4, 2004
312
US
My app works very well in local pc. After moving app from local pc to web server, crystal report did not work. There is only crystalreportviewer on the screen and no any error message. At web server, I have vs.net 2003 installed. Do I need do something else to make crystal report work?
 
LV, thank you for help but I do not think it is deploy problem. Let me tell you more detail:
I have two app, APP_A and APP_B.
APP_A is in WEBSERVER and connected to the SQL server(SQL authentication) at the same machine: WEBSERVER. There is no problem to print crystal report.
APP_B is in WEBSERVER also but connected to the SQL server(Windows authentication) which is in different machine.
APP_B has problem to print crystal report but has no problem to bind data to datagrid.
WEBSERVER is Windows 2003, IIS 6.
When I program APP_B in my local pc, there is no problem to print crystal report.
What is the problem? I spend almost whole day but still do not know.

 
Do you switching report data source on the fly? What I mean, if the report called from the web page, was originaly developed of a development database but then was moved to production and now has to look at the production database, it won't work since a production db is on a different server and has different logon and password.
 
Yes, I use code as bellow:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rpt As New MyReport 'The report you created.
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand
Dim myDA As New SqlDataAdapter
Dim myDS As New dstRpt 'The DataSet you created.
Dim MyConnectionString As String

MyConnectionString = ConfigurationSettings.AppSettings(WEBSERVER)
myConnection = New SqlConnection(MyConnectionString) 'from web.config
MyCommand.Connection = myConnection
MyCommand.CommandText = MYSQL
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "tblOrder")
rpt.SetDataSource(myDS)
rpt.PrintToPrinter(1, False, 0, 0)
Me.crvOrder.ReportSource = rpt 'CR viewer
End Sub

If I bind to a test datagrid using myDS, I got data from SQL server which is in another machine. The only thing look like did not work is:

rpt.SetDataSource(myDS)



 
Looks like you're reporting off a DataSet. Unfortunately, I have no experience with that, my reports are all ADO. Try forum149 or forum766.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top