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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LogOnServer Method

Status
Not open for further replies.

Jacob438

Programmer
Jul 27, 2001
69
US
I'm working on creating an app in VB that uses the .dll implementation of the Crystal RDC. Version is 8.5. Anyways, I have a line of code like this to open the report:

'Open the report
Set Report = crxApplication.OpenReport(strPath & strName & ".rpt", 1)
crxApplication.LogOnServer "pdsodbc.dll", "Mendocino", "Sonoma", "report", "report"

My question is, for the LogOnServer method, what is the "pdsodbc.dll" file for? This line works on my machine, even though I can't find a pdsodbc.dll file on my machine, I just used this because that's what the example said to use. The reason I'm concerned, is because one of the machines I'm testing on (it is winXP) pops up an error message saying it can't find the library pdsodbc.dll (which I can't find on my machine either, but I don't get an error). Thanks,

Jacob438
 
Are you sure it's not p2sodbc.dll?

Here is a different method with same results
Report.Database.Tables(1).SetLogOnInfo "Vantage 51 TRN", "vantage", "Username", "Password"

The p2sodbc.dll is your odbc wrapper. Crystal calls functions from this dll to interact with your ODBC database driver. Check you system closer if you have 8.5 dev on your machine you have this dll somewhere.

If it is Pdsodbc.dll then it could possible be the database ODBC driver dll. The Logonserver method wants you to pass the ODBC driver dll for the database. This might be one supplied by crystal, but it's not on my machine.
 
hmm... so when I distribute my app, should I include these using the package a deployment wizard (VS 6)? Do I need both pdsodbc.dll and p2sodbc.dll, or just the 32bit version? Thanks,

Jacob438
 
Include them both. On every app I have ever written I get the same error with out the p2sodbc.dll. "Not log on to server." If your user has the ODBC driver then you don't need to distribute the Database DLL. The way Crystal Tech support explained it to me was the p2sodbc.dll handles the data from your odbc driver. The p2sodbc.dll should be all you need.


[Setup1 Files]
craxddrt.dll
craxdrt.dll
crviewer.dll
p2sodbc.dll
 
Cool, I distributed the ps2odbc.dll file and it now works on that computer (once I have the System DSN set up correctly). Now I'm getting an error regarding when IU export the file, it is the following:

-2147190548 (800478ce)
Missing or out-of-date export DLL

Which files do I need to include to export? This is getting to be a pain to distribute! :)

Thanks

Jacob438
 
Check under your c:\winnt\crystal folder. There will be a bunch of dlls. The u2f*.dll's handle the export format and the u2d*.dll's handle the export location. The only exception is the PDF writer and rtf writer. That is the crxf_pdf.dll and crxf_rtf.dll. You should also distribute exportmodeller.dll and crtslv.dll. These last two dll's must be registered on the end users system. Not all export types will fail with out these dll's but better safe than sorry.
 
ok, cool thanks, you've been awesome in answering my questions! I am only exporting to disk in RTF format, so I will try adding some of those and I'll let you know how that goes, thanks a million!


:)

Jacob438
 
for those last two dlls, you said they have to be registered? Is there a way to do that automatically using the package and deployment wizard that comes with visual studio 6? I included the necessary .dlls except for those last 2 and now I get:

Run-time error: '-2147190908 (80047784)'
Failed to export the report

Thanks a million!

Jacob438
 
Use a text editor to add a line like below to the setup.lst file. You will need to have the files available in your .cab or support directory. The $(DLLSelfRegister) should take care of the registration. You can probally leave the $(WinSysPath) there two. The last jumble is just file information. If you get this wrong the install will complain about versions and file dates.

File1=@craxddrt.dll,$(WinSysPath),$(DLLSelfRegister),$(Shared),2/9/01 7:47:39 PM,8646715,8.5.0.217

Later
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top