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

CR8 RDC LogOffServer

Status
Not open for further replies.

phirst

Programmer
Oct 26, 2000
57
0
0
FR
Hi,
This is getting me down >:-<
I am using RDC to run a report (using Progress 4GL).
I connect to the CrystalRuntime.Application object.
I connect to the database (via ODBC).
I print the report.
Then I want to disconnect the database.
I check CanClose, it gives me &quot;true&quot;.
I have set the report object to nothing (in Progress it is ? actually).
When I use the method LogOffserver I get...
&quot;Unable to disconnect. Server is in use&quot;.
What am I missing?
Thanx,
phirst.

 
I'm having a similar issue.
I can open and view my reports, they connect to the database without a problem.
When I close the window, call the report and application variables' LogOffServer methods.
Then get the &quot;Server is in use by some reports&quot; error.

I get the impression from what little documentation I can find that I should use the ReportViewer's CloseView() method, but cannot figure out _how_ it should be called.

If there is a better way of accomplishing this, I'd appreciate the help
 
Was a solution ever found to this as I am having the same problem.

I can't use CloseView since I only have one view open (apparently you can't use this to close the last view).

In my application I close the screen with the view but it still seems to be lurking somewhere.

How can I close the report that I have opened?

Thanks.
Keith Keith Matthews
Nexus Billing and Payments Developer
Logica UK
 
Here is the solution I came up with after talking with Crystal Decisions tech support. They wanted me to have a seperate form with the crviewer on it and close that window prior to closing the form the report was called from and running the LogOffServer command.

If Viewed Then
Set Rep = crxApplication.OpenReport(ReportPath & &quot;clear.RPT&quot;, 1)
CRViewer1.ReportSource = Rep
Rep.Database.LogOffServer &quot;P2SODBC.DLL&quot;, &quot;ATICTS&quot;
End If

ReportPath = &quot;c:\Program Files\appfolder\reportfolderclear.rpt = a blank report, there is absolutely nothing in this report
ATICTS = name of the ODBC DSN

If you would like a copy of the test program modified and sent to me from Crystal Decisions, let me know and I will forward it on to you.

Jeff
 
Hi dataent,

Please email me the copy of the test program modified and sent to you from Crystal Decisions.

Thank you very much !

Dave Rattigan
drat@attbi.com
or
drattigan@parlex.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top