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

"Server yet not opened" error with PDSSQL.DLL ....Help me....

Status
Not open for further replies.

mthakershi

Programmer
Aug 24, 2001
79
US
Hi All,
I am new to this forum and new to Crystal Reports too. I am facing problems in RPT to PDF conversion from ASP.

The project for which this conversion is to be provided has MS SQL Server 2000 backend and Crystal Reports 7.0 as reporting tool.

I found that there is no direct conversion possible with Crystal 7.0 runtime (tried with converting to XLS and RTF inbetween) from RPT to PDF. There is direct conversion possible with Crystal 8.5 runtime. So I tested it.

The original 7.0 reports have database driver as "PDSSQL.DLL" and when I tried either LogonServer or SetLogonInfo methods in ASP, it is getting me error "Server has not been opened yet."

When I prepared new report with 8.5 and set database driver to "PDSOLEDB.DLL", it is working fine and fluent. So it comes out like I have to create reports once again. Because when I upgrade 7.0 reports to 8.5 and set database driver to "PDSOLEDB.DLL", it is not working at all (even crystal report application is hanging when I refresh the upgraded report).

Here is the code I am using for it (I just got it from samples)
_______________________________________
<%
reportname = &quot;VendorSchedule85.rpt&quot;
<!--#include file=&quot;VendorSchedule.inc&quot;-->

<%
Set session(&quot;oApp&quot;) = Server.CreateObject(&quot;CrystalRuntime.Application&quot;)

path = &quot;D:\&quot;

If IsObject(session(&quot;oRpt&quot;)) then
Set session(&quot;oRpt&quot;) = nothing
End if

session(&quot;oApp&quot;).LogOnServer &quot;pdssql.dll&quot;,&quot;server&quot;,&quot;db&quot;,&quot;sa&quot;,&quot;&quot;

Set session(&quot;oRpt&quot;) = session(&quot;oApp&quot;).OpenReport(path & reportname, 1)

<<Setlogoninfo if not using logon server........>>>

session(&quot;oRpt&quot;).DiscardSavedData

<<making and giving report object query.......>>>>
session(&quot;oRpt&quot;).SQLQueryString = cstr(strSt)


session(&quot;oRpt&quot;).MorePrintEngineErrorMessages = False
session(&quot;oRpt&quot;).EnableParameterPrompting = False

session(&quot;filename&quot;) =&quot;malay.pdf&quot;
session(&quot;filetype&quot;) = &quot;Adobe PDF&quot;

Set session(&quot;ExportOptions&quot;) = Session(&quot;oRpt&quot;).ExportOptions

session(&quot;ExportFileName&quot;) = &quot;c:\&quot; + cstr(session(&quot;filename&quot;))


Select Case cstr(session(&quot;filetype&quot;))
Case &quot;Adobe PDF&quot; ExportType = 31
End Select

If (cint(ExportType) <> 24) then
session(&quot;ExportOptions&quot;).DiskFileName = session(&quot;ExportFileName&quot;)
Else
session(&quot;ExportOptions&quot;).HTMLFileName = session(&quot;ExportFileName&quot;)
End If

If cint(ExportType) = 10 then
session(&quot;ExportOptions&quot;).NumberofLinesPerPage = 50
End if

session(&quot;ExportOptions&quot;).FormatType = cint(ExportType)
session(&quot;ExportOptions&quot;).DestinationType = 1

Session(&quot;oRpt&quot;).Export False

<end of sample code.......>
_______________________________________

Please guide me. I think that there is problem with the dll only (because in other cases it is working without logonserver method).

Thanks,
Malay M. Thakershi
 
Never use the PD*.DLL's. Use the P2*.DLLs. The PD* DLLs are the 16-bit DLLs.
 
Hi Balves,

I know this, but still my question is up. Same thing is occurring with p2*.dll. Please get into this once more and try to pull me out of the pit.

One more thing. After I installed Crystal Report 8.5, still in the Convert Database Driver option I am not getting names of the p2*.dll. It is just showing the 16 bit dlls. What could be the reason? May be because I upgraded from 16 bit Crystal report to 32 bit (I didn't installed the fresh one, may be at that I did not had it). But that question is there, I am trying my best to get out myselt, but any type of help is going to help.

Anyway, thanks for your quick response.

Thanks Again,
Malay M. Thakershi
 
The fact that the Convert Driver window shows the PD* names is a display bug on the window. It's documented on the Crystal web site. Ignore it.

I've stuck with the ODBC driver, p2sodbc.dll, because it gives the least amount of problems.
 
Hi Balves,

Thanks for your suggestion. But p2sodbc.dll is more problematic when I have stored procedures in the query for that report. You know what? If that stored procedure contains select statements in the if or while loops the report builder won't allow to refer to those stored procedures. Hard luck for me is that, I have all the SPs running like that in the queries so if I change it to p2odbc.dll, I have to update at least 30 dirty SPs which are running fine till now and the project is on verge of release.

One more thing. I have to make DSN on the server for p2ODBC.dll to work.

If I could achieve the goal with p2odbc without facing this problems please tell me. If you are using p2odbc.dll how you are resolving the SPs with the features I mentioned above.

I am dragging you more and more, ain't I? Again post reply when you are ready with it. Right?

Thanks,
Malay M. Thakershi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top