Using Crystal Reports Viewer in Microsoft Access 2002

Posted on 2004-11-11
Last Modified: 2012-05-05
We are trying to use the Crystal ActiveX Report Viewer Control 10.0 on an Access Form to display a Crystal Report (*.rpt), that has no parameters, or even data links (the report is just an empty form).  I've searched for quite awhile on the net trying to find out how to display the report.  I've tried the following sites: (results in Type mismatch in createobject line) (Failed on app.CreateReport)

I have added the Crystal ActiveX Report Viewer Control 10.0 to the form, and am referencing Crystal ActiveX Designer RunTime Library 10.0 and Crystal ActiveX Report Viewer Library 10.0.

Can someone please suggest some code for Form1 that would make the ActiveX report viewer (CRViewer) display the report ("C:\report.rpt")?

Any assistance would be appreciated...this is the final stroke in the application.

Question by:kmoloney
    LVL 14

    Accepted Solution

    Step one)  in the references be sure to have then Crystal Report View Control and the 10.0 ActiveX Runtime Library checked

     Step 2)  Add the Crystal Report Viiewer to your Form (I make a form for Report Review only, then just change the report name each time I need a preview.  The code here is a one shot deal, only the report.rpt)
     Step 3) Add the following to the General Declarations:

    Dim crApp As CRAXDRT.Application

     Step 4)  Here is the Form Open event:

    Private Sub Form_Open(Cancel As Integer)
        Set crApp = CreateObject("CrystalRunTime.application")
        Set REPORT = crApp.OpenReport("Report1.rpt")
        With crViewer
            .ReportSource = REPORT
            .EnablePrintButton = True
        End With
    End Sub

    LVL 2

    Author Comment

    Rob -

    I get a Runtime Error 13 - Type Mismatch, when the following line attempts to run:

    Set crApp = CreateObject("CrystalRunTime.Application")

    Same problem I had with the solution at

    What is this line attempting to do?

    LVL 14

    Expert Comment

    it is creating the Crystal Reports Application object based on the Crystal Report Runtime.  (Just  note, I use Crystal 8.5 BUT it is suppose to work on all version After V7)

    Look for a CRAXDRT.dll in your System32 Directory
    LVL 2

    Author Comment

    Okay, here's probably what the problem was:

    In my Toolbox, I have:

    Crystal Report Viewer Control (crviewer.dll in Windows\System32\)
    Crystal Report Viewer Control 9 (crviewer9.dll in Windows\Downloaded Program Files\)
    Crystal ActiveX Report Viewer Control 10.0 (crviewer.dll in C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10\ActiveXControls\)

    I think I straightened out part of this because I did have the craxdrt.dll available and checked.  But now it gives me the following error:

    Run-time error '-2147206429 (80043ae3)':
    Invalid TLV record

    Also, another thing I noticed is that if I double click on a *.rpt file, it asks me to log on to Crystal Enterprise.  We don't have crystal enterprise, but there are a lot of available references to Crystal Enterprise.  Anyway, I have to click "Cancel" and then I can see the report.
    LVL 2

    Author Comment

    PLEASE POST ANY RESPONSES IN THE FOLLOWING URL:  I will still award all 500 points.
    LVL 14

    Expert Comment


    loose this {Crystal Report Viewer Control 9 (crviewer9.dll in Windows\Downloaded Program Files\)}
    and {Crystal ActiveX Report Viewer Control 10.0 (crviewer.dll in C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10\ActiveXControls\)}

    then try it
    LVL 2

    Author Comment

    RD -

    Your answer was fine.  However, I'm still having a problem with an "Invalid TLV Record" error message.  This appears to be outside the scope of Microsoft Access and VBA, but is a Crystal Reports problem.  This question is posted again in the Crystal Reports section.



    Expert Comment

    Crystal Reports ActiveX Designer error '80043ae3'

    Invalid TLV record.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now