Using Crystal Reports Viewer in Microsoft Access 2002

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:

http://www.crystalkeen.com/articles/crystalreports/rdcinvba.htm (results in Type mismatch in createobject line)
http://www.necrug.com/Crystal-Training/crystal-forum-message.asp?site=&topicid=4213 (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.

Kevin
LVL 2
kmoloneyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RDWaibelCommented:
ok...
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
Dim REPORT As CRAXDRT.REPORT

 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
        .ViewReport
        .EnablePrintButton = True
    End With
End Sub

Rob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kmoloneyAuthor Commented:
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 http://www.crystalkeen.com/articles/crystalreports/rdcinvba.htm.

What is this line attempting to do?


0
RDWaibelCommented:
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
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

kmoloneyAuthor Commented:
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.
0
kmoloneyAuthor Commented:
PLEASE POST ANY RESPONSES IN THE FOLLOWING URL: http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21203530.html.  I will still award all 500 points.
0
RDWaibelCommented:
ok....

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
0
kmoloneyAuthor Commented:
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.

Thanks!

Kevin
0
aurionproCommented:
Crystal Reports ActiveX Designer error '80043ae3'

Invalid TLV record.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.