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 has not yet been opened" using SQL Designer File

Status
Not open for further replies.

PeteCozens

Programmer
Aug 30, 2001
12
NL
I have an automated process which runs reports overnight, and exports them as Crystal Report files (this way, the data is saved with the report, therefore the client PCs do not need database connections).

When the report is loaded by the client app (written in VB6, using the Crystal 8.5 RDC Viewer), I get the error "Server has not yet been opened", but only for reports which are based on Crystal SQL Designer files. Any ideas why? The VB Code is as follows:

Dim objCrystal As New CRAXDRT.Application
Dim objReport As CRAXDRT.Report
Set objReport = objCrystal.OpenReport(strReportPath)

objReport.DisplayProgressDialog = False
objReport.EnableParameterPrompting = False

CRViewer1.ReportSource = objReport
CRViewer1.ViewReport

Thanks for any help,

Pete
 
The database location is coded into the .qry file when the Crystal SQL Designer query is created. I don't think you can update this from the VB app. Be sure the query runs in the CR SQL Designer using the identical database location as your app uses. Also be sure that the query is NOT saved WITH DATA in the SQL Designer.
 
Thanks rogar.

The QRY file was saved without any data included, so that's not the problem, and the report runs fine in the overnight process. The exported report can be opened and viewed in the Crystal IDE without any problems (except for the fact that it prompts for a dictionary file when opened - this can be dismissed by hitting the "Proceed without dictionary" button)

My problem is when the exported report is opened in the CRViewer control (using the code in my original post) in a client app that has no database connections (it shouldn't need them if the data is already embedded in the report). That's when the error message popped up.

Is there any way to programatically set the CRAXDRT.Report/CRViewer object to "Proceed without dictionary"? I can't see anything in the COM interfaces that would indicate this.

Any ideas?

TIA,

Pete
 
I had a similar problem with .qry files and saved data. I logged this with Seagate and was advised that qry files were for development and not front end. This was their reply:

I can see where the problems may be occuring. Basically reports that are
created of a Crsytal Query file are not able to be called at runtime from
the RDC, Automation server, API or ocx control. The qry files were never
designed to be called by a front end application and lots of errors may
occur running them from something other then the Crystal Report designer
or Crystal Info.
 
So in other words, Seagate's response is "Dunno, Don't Care" ??? Gotta love that customer service!

Did you find a workaround, or did you have to give up? The reports I'm working with are far too complex for Crystal to cope with using it's graphical query editor - they can only be done by coding SQL directly into these QRY files - so I've GOT to find something...
 
CR prompts for a "dictionary file" when it can't find its .qry file (go figure!). Maybe if you put a copy of the .qry file with your exported .rpt file??

But then you say it seems to be trying to open a database connection and can't, even tho it has saved data???

Troyboy is right --- Seagate does not support .qry based reports with anything other than the CR environment.

If your database supports stored procedures, you should put your SQL query in the database. Another option is to use another export option - pdf, rtf, xls -- to distribute your results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top