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
  • 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.
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

809 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