logonserver connectivity prob with crystal report

ynsrikanth
10-12-2004, 11:36 AM
HI,

i have created a dsn with microsoft oracle odbc driver. crdp4po.

I am using CRAXDRT.application for generation of output to PDF format from Visual basic.

crreport.database.logonserver "pdsodbc.dll","crdp4po","rpodv","xyz","zzz"

It says

logon failed
invalid connection string attribute.

When i tried through oledb connection, it is working fine. But when i tried with odbc, it is saying error.

Please help me in this.

MKoslof
10-12-2004, 07:29 PM
I would use an oledb connection over ODBC..it is more flexible :). What version of Crystal are you working with? Can you show me more your code where you instantiate all of your report objects.

ynsrikanth
10-13-2004, 05:56 AM
I would use an oledb connection over ODBC..it is more flexible :). What version of Crystal are you working with? Can you show me more your code where you instantiate all of your report objects.


I am using Crystal Reports 9.0 and oracle 8i. They have some coding standards and they need to do with ODBC only.

Set crreport = CRAPP.OpenReport("D:\Srikanth\p4-po\working\coding\crystal\po_ver1.8.rpt")

' setting the parameter

this is working.

'crreport.Database.LogOnServerEx "pdsoledb.dll", "rpodv", , , , , "Provider=MSDAORA.1;Password=zzz;User ID=xyz;Data Source=rpodv;Persist Security Info=True"

this connection is not working

'crreport.Database.LogOnServer "pdsodbc.dll", "cr9db", "rpodv", "xyz", "zzz"

after assigning filename and all.

With crreport
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.PDFExportAllPages = True
.ExportOptions.DiskFileName = crdfilename
.ExportOptions.FormatType = 31 'creftportabledocformat
.DisplayProgressDialog = False
.Export (False)
End With

when i used the logon server, it says,

When I run the program, It says “Invalid string connection attribute.”

i tried to create dsn with both microsoft odbc driver for oracle as well as oracle ODBC driver.

I couldnot connect with this syntax..

Please help me out in this, as this is very urgent

MKoslof
10-15-2004, 09:37 PM
OK, for Crystal Report 9 and higher, I would use strictly RDC methodology and the CRAXDRT object library. For connecting to your database, use the .ConnectionProperties method. There a few samples posted on this forum regarding using this method. See here for one example:

http://www.visualbasicforum.com/showthread.php?t=131462

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum