Access 2000, Crystal Reports 8, and choice between ADO or straight query

Posted on 2003-11-19
Medium Priority
Last Modified: 2008-03-10


First, I'm using Crystal Reports 8 Developer edition.  I have created a report based on a query from an Access 2000 database.  I'd like to be able to run this report from an Active Server Page on our intranet where I can declare just one parameter - the date values.  Here are my questions:

1)  Would this be better or more efficient if I were to run this report by calling a .ttx file and ADO recordset as opposed to going straight to the query?

2)   I was experimenting with the example files from Crystal Decisions.  When I was experimenting with using a .ttx file and ADO connection, I kept getting the error that my DSN was not available or didn't have the correct driver.  In all the comments from the experts here, I never heard of anyone having to declare which driver - just the .mdb driver, which was set up according to the instrctions.  Am I missing something?  I did actually open the example database and it did ask me if I wanted to convert it to the current version.  Would this be the problem and, if so, how do I fix it?

Thank you in advance.
Question by:gderoeck
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
LVL 13

Expert Comment

ID: 9785170
- using ado would usually be slower
- if you want to use ado though, have you selected "fielddefinitions" in the data explorer?
LVL 101

Assisted Solution

mlmcc earned 200 total points
ID: 9787790
The .mdb driver is for mdb files.  The TTX driver is different.  Did you install it when you installed Crystal?


Author Comment

ID: 9789036
Ok, I'm probably missing something....

EwaldL - how do you select fielddefinitions in the data explorer?  Not sure I know what you're talking about

mlmcc - when I used the examples from Crystal Designs, it came with a .mdb database for an example.  It had me make a DSN connection through administrative tools (Win 2000 Pro) with the Access driver to that example database.  

I'm sure the TTX driver was installed - I could set it up as a datasource in Crystal.  I have a feeling that the issue is with the .mdb driver, since in my ASP page, I'm trying to create an ADO recordset before Crystal is even called.  That's where I'm getting stuck.  Thoughts?

Thank you both for your responses.
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.

LVL 13

Accepted Solution

EwaldL earned 200 total points
ID: 9790218
create a new report, in the data explorer select "more datasources" -> "active data" -> "active data (field definitions only)". now you can point to the ttx file. i wouldn't recommend this though unless you have a good reason for chosing recordsets. a native connection tends to be heaps faster!  ... and easier! ;-)

Author Comment

ID: 9791578
Ok, I'm going to go with your method.  I've created the report, linked it to a query in my Access 2000 database.  All works fine within the report itself.

I set up an ASP page to call the report.  When I try and run the ASP page, I get an error saying I can't connect to the datasource (which is an error message I put in) and a box that pops up saying my User Session has expired.  Here is the code I'm using for the ASP page:

<title>Crystal Reports ASP Example - Displaying a Simple Report</title>


reportname = "CallPerformancePeriod.rpt"


If Not IsObject (session("oApp")) Then                              
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application")
End If                                                                

Path = Request.ServerVariables("PATH_TRANSLATED")                    
While (Right(Path, 1) <> "\" And Len(Path) <> 0)                      
iLen = Len(Path) - 1                                                  
Path = Left(Path, iLen)                                              

If IsObject(session("oRpt")) then
      Set session("oRpt") = nothing
End if

'Response.Write (path & reportname)

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

session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False




On Error Resume Next                                                  
If Err.Number <> 0 Then                                              
  Response.Write "An Error has occured on the server in attempting to access the data source"

  If IsObject(session("oPageEngine")) Then                              
        set session("oPageEngine") = nothing
  End If
set session("oPageEngine") = session("oRpt").PageEngine
End If                                                                

<TITLE>Seagate ActiveX Viewer</TITLE>

      WIDTH=100% HEIGHT=95%
<PARAM NAME="EnableRefreshButton" VALUE=0>
<PARAM NAME="EnableGroupTree" VALUE=1>
<PARAM NAME="DisplayGroupTree" VALUE=1>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="EnableDrillDown" VALUE=1>
<PARAM NAME="EnableSearchControl" VALUE=1>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=1>

Sub Page_Initialize
      On Error Resume Next
      Dim webBroker
      Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
      if ScriptEngineMajorVersion < 2 then
            window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
            CRViewer.ReportName = "rptserver.asp"
            Dim webSource
            Set webSource = CreateObject("WebReportSource.WebReportSource")
            webSource.ReportSource = webBroker
            webSource.URL = "rptserver.asp"
            webSource.PromptOnRefresh = True
            CRViewer.ReportSource = webSource
      end if
End Sub

Again, the view comes up, but gives me that error.  Thanks in advance.
LVL 13

Expert Comment

ID: 9795245
to start with asp make sure you are trying the sample applications first

have a look at

here in SimplePreviewReport.asp, change
 <!-- #include file="SmartVieweractivex.asp" -->    

 <!-- #include file="SmartViewerHTMLFrame.asp" -->    

this will avoid any possible trouble with installing the active x viewer on a client by using pure html

Author Comment

ID: 9802058
Thank you both, but I found out the problem.  I fixed it by setting up an OLE-DB connection and not going through DSN.  It seems a lot more efficient to do it this way and it works great.  I split the points between the two of you - you both were very helpful, thank you.
LVL 101

Expert Comment

ID: 9808097
Glad I could help


Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question