on 06-16-2011 7:40 AM
Hi to all,
I developed an application with VS2010 prof. containing some reports created with Crystal version for Visual studio.
On my computer everything is ok either running it from the development environment or running the compiled program that is placed in the same position that users should use. If you launch the program from another computer (test done on three different PCs) when you view the report it shows a login screen that is visibile at this link
[http://www.dotnethell.it/forum/ShowImage.aspx?ImageID=1682]
and it doesn't show the report. Also if I insert username and password nothing to do it returns Access denied.
My code (VB) used to pass credentials to report viewer is the following:
Dim report As ReportDocument = New ReportDocument
Dim nr As Integer, i As Integer
Try
report.Load(nomeReport)
Dim logOnInfo As New TableLogOnInfo
nr = report.Database.Tables.Count
For i = 0 To nr - 1
logOnInfo = report.Database.Tables.Item(i).LogOnInfo
logOnInfo.ConnectionInfo.ServerName = cSettings.server_name
logOnInfo.ConnectionInfo.DatabaseName = cSettings.db_name
logOnInfo.ConnectionInfo.UserID = cSettings.dbUser
logOnInfo.ConnectionInfo.Password = cSettings.dbPassword
logOnInfo.TableName = report.Database.Tables.Item(i).Name
report.Database.Tables(i).ApplyLogOnInfo(logOnInfo)
Next
crViewer.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None
Me.crViewer.ReportSource = report
Catch ex As Exception
MsgBox("Errore nella stampa del report " & ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation)
End Try
I use SQL Server express 2008 as database using oledb to connect to it.
On client PCs I installed runtime version 13.0.1 and operating systems are both windows xp and 7
Where is my fault?
Thanks in advance,
Massimo
Compare the SQL Server express 2008 client - it should be the same on all.
As a test, comment out the logon code and let the report prompt for the logon - does that work?
See the article [Troubleshooting Guide to Database Connectivity Issues with Crystal Reports in Visual Studio .NET Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de]
Also, downloading the CR 2011 designer and installing it on one of these client boxes is a good idea. You can download CR 2011 eval from here;
http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
See if you can run the report in the CR 2011 designer. If not, it may point you to a solution.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.