[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Launching Crystal Reports from Access

Posted on 2014-02-05
Medium Priority
Last Modified: 2014-02-16
I'm helping out on a project that is being phased out and moved to Access.  It uses SQL Server so all of the Access tables connect to a remove (internal) server.
Part of the project requires launching various Crystal Reports.

I tried direct launch (shell "path.rpt") but it only launches Crystal in design mode.
I also tried "connecting" to Crystal in various ways but the best I could get was an error that said "invalid login".

Anyone have ideas about how to launch CR (maybe version 8.5...not sure since I don't have immediate access to the project) using a command-line switch (e.g. CR -r my.rpt)
Or using VBA to launch it (which references do I need)?

I don't mind building a separate viewer window, but I'd prefer to just launch CR.  Users will have access to the network drive where the reports are located and should be able to view it using a shared user/pswd combination (which could be hard-coded as needed.)
Question by:rspahitz
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
  • 6
  • 5
  • 2
LVL 85
ID: 39836608
Will your users all have Crystal Reports? That is generally not the way an environment like that works. Instead, normally they'd have some sort of "viewer", and would see the reports there. That "viewer" can be many different things, and there are free ones out there.

CR used to have an activeX control that could be used in Access to some degree, but I believe that went away several versions back.
LVL 101

Expert Comment

ID: 39836885
Crystal cannot  be launched from the command line.

Do you have the full version of Crystal the reports were developed with?
If so, you may be able to build the capability into an Access application.  I know for sure it must be CR XI or before to be able to do this.

There are several 3rd-party tools you could use for this.  Some of them are callable from the command line

Ken Hamady has an excellent list of the tools

He also reviews the tools annually.  The report viewers review is at

The Data Link Viewer from Millet Software is one that can be called from the command line.
It is relatively inexpensive.

LVL 22

Author Comment

ID: 39837589
I think that all have access to CR through the network (launching a shared instance?)

A viewer would be fine.

I saw a bunch of references to the ActiveX control and almost got it to work, but the login problem occurred (with no apparently way to supply that information--maybe it was trying to authenticate but had the wrong credentials.)

I can ask if they want a 3rd party control but I suspect they'd rather just migrate everything to Access unless the control is a cheap 1-time purchase that require virtually no maintenance or learning curve.

Since we are able to edit the reports in design view, I suspect we have access to migrate the capabilities (is there a tool for that so I don't have to write it?)
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

LVL 101

Expert Comment

ID: 39837711
There is no tool to migrate from Crystal to Access.  You will also find that the 2 reporting tools though similar in many ways have significant differences in how they do somethings.

CR is controlled by licenses and is not except through specific licensing supposed to be shared.  Licensing is version specific but most of the newer versions use named licenses or machine licenses.  Named license - a specific user can use r Crystal on any machine but nobody else can use his copy.  Concurrent - allows several people to use the copy but only one at a time.  Typically Crystal when purchased comes with 5 named-user licenses so they can be assigned to 5 users.

Have you determined the version of Crystal you are using?

LVL 22

Author Comment

ID: 39838049
The person I am working with is out until Monday so I won't be able to get the version until then, but I think we were working with CR9.exe, if that indicates the version.

As for licensing, I don't know how they handle it but they are a very large org so may have special licensing agreement, such as 500 licenses with the ability to have any one access as needed...if they offer something like that, or maybe the all have it installed on their machines but access the reports on the network.

Regardless, at least part of the problem is pulling the report files off the network to generate the reports on the local machine,
If we assume that all is local, maybe that would work across the network (which they call the V drive for the reports)
LVL 101

Expert Comment

ID: 39838881
Crystal doesn't have the version number in the application name.

WHen you open a report

You will see the version and edition.
Edition will be  Standard, Professional, Developer, or Advanced.

You need Developer or Advanced to be able to use it from MS Access.

LVL 22

Author Comment

ID: 39845700
Just checking in....

"Do you have the full version of Crystal the reports were developed with?
If so, you may be able to build the capability into an Access application.  I know for sure it must be CR XI or before to be able to do this."

At this point, I am assuming that the developer version is installed.
If I "build the capability into an Access application" will that be impacted by the non-dev licensed users? (I assume it just requires a login.)

With this assumption, how would I proceed? Just add the ActiveX control? Because I tried that and it failed to log in (and never asked for any login info.
LVL 101

Expert Comment

ID: 39846259
Crystal itself in general doesn't require a login.  The login is for the database.

I don't know of any examples for the code for calling Crystal from MS Access.

I will look again or I may even be able to develop it myself.

LVL 22

Author Comment

ID: 39853958
"We are using CR 9 now."

So it seems that these are the options:

* launch from a command window and it will only be in design mode
-- unacceptable

* add an ActiveX window in Access to allow the report to show there (and feed it appropriate parameters)
-- may not work on version 9

* connect to the CR server (or whatever it is) using a reference in VBA
-- should work if I can figure out which reference file to use.

* convert all reports to Access reports
-- there are too many, some are too complicated, and some get launched through a DB stored procedure, which seems to make it impractical to use this option

Any other choices? or any other suggestions?

When I tried the ActiveX, I think it failed because it couldn't get proper credentials to get in (but maybe that was a server problem rather than a CR problem.)

I'll be back working on it Saturday and will see if anything else works.
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 400 total points
ID: 39854221
The ActiveX doesn't use the server, I don't believe. The ActiveX control generally just loads a local report (a .rpt file) that is filled from your database. Note there are several different ways to fill a Crystal report, from .ttx files to database connections to datasets.
LVL 101

Accepted Solution

mlmcc earned 1600 total points
ID: 39854387
Do you have the Developer or Advanced edition of CR9?
If not you don't have the dlls required to call reports from Access.
Have you considered using one of the 3rd-party tools I linked to?

LVL 22

Author Comment

ID: 39854625
I didn't get word back about whether it's developer, but I suspect it is.
Do you know which dll (or Reference name) to add?

As for the 3rd party tools, I'll submit that to the person in charge to see if she would consider going that way.

I'll report back after my Saturday meeting with her.
LVL 22

Author Closing Comment

ID: 39863081
Thanks for all the help.  It was a struggle and I'm not sure how much the above solved it, but I'm sure it got me in the right direction.

The answer ended up being that I had to add a bunch of DECLARATIONS at the top of the VBA file to load dll functions to connect, load, open and show the reports.  This allowed it to connect to the network with the password and launch the Viewer in a separate window for viewing.

Thanks for the guidance.

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

656 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