on 02-24-2015 8:13 PM
Hi , im student from mexico, i have a truble with Crystal Report so u can help me ? plz
my problem with Crystal Report is when i try to print
check my code
repComandaGeneral.Load("C:\Users\Usuario\Documents\DozRES - comandas\RepTicketCGeneral.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault) repComandaGeneral.SetDatabaseLogon("root", "1234", "localhost", "dozres") ' Login base de datos
'Dim MiConexion As New ConnectionInfo
'Dim myTables As Tables = repComandaGeneral.Database.Tables ' Informe.Database.Tables
'MiConexion.ServerName = "192.168.1.254"
'MiConexion.DatabaseName = "dozres"
'MiConexion.UserID = "root"
'MiConexion.Password = "1234"
'For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
' Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
' myTableLogonInfo.ConnectionInfo = MiConexion
' myTable.ApplyLogOnInfo(myTableLogonInfo)
'Next
repComandaGeneral.SetParameterValue(0, "Value")
repComandaGeneral.SetParameterValue("cm_id", cm_id)
repComandaGeneral.PrintToPrinter(1, False, 0, 0)
repComandaGeneral.Close()
Hi Josshua,
Do not use "localhost" for the server name, use the machine name or IP address. Or if you are connecting through ODBC then use the DSN name.
If connecting to Oracle the the Database value is an empty string.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for you comment , now the error is in the DB
i dont have idea what is this problem ..
"Details:HY000:General error:Invalid file dsn "Database Vendor Code:556 "
when im trying to view the preverview of the report , i put the password and then show me this message
Details:HY000:General error:Invalid file dsn "Database Vendor Code:556
can you help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "database vendor error 556" indicates that the query to the database returned with error 556. It's vendor specific. Look up your database vendor's documented error codes, to see what 556 indicates.
Doing a bit of googling looks like the issue is that the ODBNC datasource does not exist. Remember that there are 32 bit and 64 bit ODBC datasources. If your app is 32 bit, the DSN must be 32 bit, if it is compiled as 64 bit the DSN must be 64 bit.
See KBA 1505620 - How to create a 32 bit ODBC data source on a 64 bit Operating System
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Here's a link to an older discussion that might contain some helpful information. Especially since you're talking about SQLyog database: http://scn.sap.com/thread/1519593
-Dell
OK then you only have the one Admin...
Interesting you are using Trusted Connection. For this type do not pass in user name and password so comment out those two line in you code.
I tested this and it now makes a connection and runs the report. If you attempt to log using Trusted and set user name and password then it will fail.
If you do not want to use Trusted then set the property to False:
crConnectioninfo.IntegratedSecurity = False
Don
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.