Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Can't get a Crystal Report to Preview from VFP

Can't get a Crystal Report to Preview from VFP

Can't get a Crystal Report to Preview from VFP

Here's the code I've been told from Tek-tips that should work to PREVIEW a Crystal Report, but I can't get it to work.

I get the following error:
"Class Definition CRYSTAL.CRPRE.APPLICATION is not found" with the code below.

*** You have to create the report object ...
loCrystalRp = Createobject("Crystal.CRPE.Application")

lcReport = "c:\temp\VFPReport.RPT"
loRp = loCrystalRp.OpenReport(lcReport)
loPrev = loRp.Preview

I need to keep this as simple as possible and the Preview must be able to Export.  Thanks.



RE: Can't get a Crystal Report to Preview from VFP

I made a simple Crystal Reports rpt file and used your code to preview the report. No errors here, but I remember getting an error similar to what you report once. Have you read the runtime.hlp file that comes with Crystal Reports?  It lists some DLL files that you need to have on your system, for example:


You may need to register the files with regsvr32 in Windows before things start working right. (Go to start button, choose run, type: regsrv32 crpe32.dll)

Hope this helps.

RE: Can't get a Crystal Report to Preview from VFP

Ha ben mon vieux !

If I understand, you try to print a report from a client machine where no crystal is installed (Am I right?) If so, you'll have to install those DLL files. What I usually do is to create a Visual Basic project with all the crystal objects in it (Crystal viewers, OCX ...) compile it and create a package to distribute with the "Package & Deployment Wizard". You have to "Install" the package on each client machine to register the DLLs.

VB is always better to register a DLL in the registry.

If you have Visual studio 6.0 or VB 6 ...

If not, I think you'll have to register manually each DLL, using REGSVR32.

The list of DLL is in the "C:\Program Files\Seagate Software\Crystal Reports\Developer Files\Help\Crystal reports Developer Runtime Help"

If you are using VFP 7.0, maybe it's more efficient with InstallShield, but I did not try that.

Bonne chance.

P.S. I hope that you install all the Developers components from the Crystal CD. If you still have problem register or distribute Crystal application, take a look at the Crystal forum. Distributing crystal runtime is not a Fox problem, but a Crystal Report problem.



RE: Can't get a Crystal Report to Preview from VFP


There is a really good article on this subject at

http://www.pinnaclepublishing.com (go to FoxTalk area)

The article is "Using Crystal Reports 7 with VFP 6" featured in the 11/1999 edition, written by Nigel Reburn.

He includes a download that has a set-up (created in VB) that properly installs all the necessary .Dlls and registers them on client machines (****They are for Crystal version 7 though!****)

Hope this helps,


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close