[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

Server has not yet been opened, ASP

Hi,
I've seen many responses to this question, but none seem to solve my problem.

I installed the little CR test kit aspxmps85.exe from a previous post and got the "Begin Here" example to work fine.  The "Begin Here" report logs onto a ODBC-mdb Xtreme Sample Database and has a few columns.  Very simple report, setup IIS and it works just dandy.

I modified the report and Remove/Added a different database (Xtreme Sample Database 2003) to the report.  Used the same exact columns and the database is also an ODBC-mdb.  I get the error message "Server has not yet been opened".

I tried the simplest form of modification to get rid of this god forsaken error message because I'm trying to display a native oracle driver CR report from asp and always got that message.

I've looked at all the ASP code in the "AlwaysRequired" and "MoreRequired" asp pages for a hardcoded DSN connection string, to no avail.  I assume the CRXA???.dll just looks for the correct dll the CR report was originally developed in.

Already copied all the DLL's to winnt/system and the virtual directory from winnt/crystal.  The report runs fine from CR developer.  Is there any really stupid reasons you could get this error message, a mistake an abused malnurited monkey might make?  If so, it's probably what i'm doing wrong.  

Thanks.
0
Spareyarn
Asked:
Spareyarn
  • 6
  • 3
  • 2
  • +1
1 Solution
 
SpareyarnAuthor Commented:
OH yeah,
I'm a complete newbie concerning the Crystal/ASP marriage.  CR 8.5 Developer, IIS 5.1, WinXP PRO
0
 
mlmccCommented:
What version of Oracle?  
If it is 9i you must use Oracle's ODBC driver

http://support.businessobjects.com/library/kbase/articles/c2009948.asp

mlmcc
0
 
SpareyarnAuthor Commented:
I will be using Oracle 9.2.0.1.0, but for now I'm just using that ODBC-mdb database connection.

I'm not very clear as to how the ASP architecture works.. On some samples, I see that you have to create a Database connection object whether thru ADO, OLEDB..whatever.   However, this ODBC-mdb ASP tutorial makes no database connection objects in the ASP code.  It just creates a report object oApp or something like that , then opens the file.  I'd rather have it work that way, no special database connection hardcoding in the ASP, just give it the RPT filename and viola, it loads up.

Is there a very simple way of just loading up an ODBC CR report via ASP and it working?

Also, are you saying I can't use native oracle drivers within an ASP CR page? All of my reports are native oracle.

Thanks.  
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
SpareyarnAuthor Commented:
The 9i comment you linked to is just CR Supported drivers for XP.  I use native oracle on XP and so do all my clients and no problems.  
0
 
SpareyarnAuthor Commented:
I swear by all things Holy this post will not die willingly on the 21 day limit roadside.
0
 
vidruCommented:
Since you have the aspxmps85 samples, have a look at the 'SimpleSetLogonInfo' sample, particularly the usage of the SetLogonInfo method in 'SimpleSetLogonInfo.asp'.  You won't be able to actually run the sample unless you've got SQL Server installed (and the 'pubs' database), but the concept of passing logon credentials to a report is illustrated fairly well.

When running a report against a true SQL-based data source, you must pass logon information.  You can get skirt that with SQL Server by using Windows Authentication.  Not being an Oracle user, I don't know how you'd get around the necessity of passing login credentials.

-dave
0
 
SpareyarnAuthor Commented:
I have looked at that code and it seems fairly straightforward.  I used to have SQL Server on my machine, but something wrong with my new MDAC I needed for something else, use SQL Server mainly for cubes.   More importantly, I will absolutely have to code a Database Connection Object into the ASP if my report is Oracle based?
0
 
vidruCommented:
As far as I know, MUST supply the login information for Oracle.

-dave
0
 
Saari_LexCommented:
First things first: if you write a report, you cannot change the driver type at runtime.
This means that if you write a report using ODBC, you'll still have to use an ODBC connection at runtime.  This connection might well point at a totally different database platform, but from the report's perspective it still has to be an ODBC connection, and you cannot change it from ODBC to, say, native Oracle.  If you know that the end product will use a native driver, then use a native driver to build the report in the first place.

Secondly, a database connection object in the sense of an mdac-type connection using ADO is not necessary, unless you're using the active data driver, through which you can report off a dynamic, memory-resident recordset.  The suggestion already given about using the SetLogonInfo method of the Table class is presumably the best way to move forward in your case.

Good luck
0
 
SpareyarnAuthor Commented:
Thanks for the comment Saari,
Do I also need to incorporate the "Show SQL" SQL query from the CR report into the ASP somewhere?
Lastly, If the database is native Oracle and I want to use ActiveX, I have to use create an ADO object?

Sorry, very ignorant on this subject.  If anyone has a small code snippet of a native Oracle Connection object from ADO in ASP, that would be super too.

Thanks.
0
 
Saari_LexCommented:
No worries we all started from somewhere :-)

No you don't need to do anything else apart from setting the logon information.
From the report object, navigate to the database object and fetch the tables collection.
Then enter a loop that, for each table object in the collection, invokes the setlogoninfo method with the right credentials.
After that, you can bind the report object to the viewer and see your beautiful report.
The fact that the driver is odbc or native is irrelevant, and that's the beauty of the report object model.

The main reason why you would want to create an ADO connection object is if you wanted to report off a memory-resident recordset that can even be unbound from the original datasource.  In other words, you might want to (for example) run a simulation on a certain data set, so you retrieve the actual from the database, then add your own calculations to build a forcast data set, and pass the merged results to the report.  This needs the active data driver, so the report doesn't care where the data is coming from, as long as it's a well formed mdac-type recordset.  Why would people want to do this?
Well, for a start, the forecast data is not in the database, and we don't want to pollute the original actual tables with data that actually doesn't exist, and that's only the result of some sort of statistical algorithm.

Another reason for using an ADO connection is when you have no way of knowing what database platform the report will use at runtime, and for whatever reason you can't use an ODBC layer or an OLEDB connection straight to the datasource.

Bear in mind that, in all cases using the active data driver and feeding a mdac-type recordset to the report at runtime, you end up with a very resource-consuming application that can easily eat up a lot of memory.
0
 
Saari_LexCommented:
I'm interested :-)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 6
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now