Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I can't change connection of my report
Message
De
25/08/2006 18:41:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
I can't change connection of my report
Divers
Thread ID:
01148745
Message ID:
01148745
Vues:
71
Hi Friends,

I've created one report that is connected to a table in MS SQL Server, I have my report connected through ODBC (RDO). When I created my report Crystal Reports asked me to enter the connection string and on the next page I entered the database, server, user id, and password (I do not use an ODBC DSN). Then I could connect to the Database and select a table, which, by the way, has very few records. Then I designed my report. The database that the report connects to is on a Developent Server, my problem begins when I want to connect this report to the production server so that users can use the report. I've have read Craig Berntson's book, but I can not get it to connect my report. I do the following...
oApp= CREATEOBJECT('CrystalRuntime.Application')
oRpt= oApp.OpenReport('MyReport.RPT')
oRpt.Databases.LogOnServer('p2sodbc.dll','MyDSN','DBase','MyUserId','mypwd')
** At this point everything seems OK, but when I exec the following line...
oRpt.Export(.T.)
** It shows me the dialog box with the 'Format' and 'Destination' 
** comboboxes, and when I click on 'OK', it sends me a messagebox with the ** following:
** OLE IDispatch exception code 0 from Crystal Reports ActiveX
** Designer: Logon failed.
** Details: 28000:[Microsoft][ODBC SQL Sever Driver][SQL Server]Login 
** failed for user 'MyUserId'
It doesn't work as expected, I even had to create an ODBC DSN for the production server but I don't really want to create an ODBC DSN for the reports, I want to use a connection string that I would generate from my VFP app instead. I even tried with LogOnServerEx but the same happens. Can anybody help me with this?

TIA

Luis
Répondre
Fil
Voir

Click here to load this message in the networking platform