• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Intergating XCrystal Reports into VB

Hi Everyone

I seem to be having a problem trying to incorporate a Crystal Report into VB.

How do I do this and what impact will this have on my deployment?

How can I adjust where the report should look for the access database once it is in VB?

Will the report open in VB or in Word, or in a viewer? Which is best and how do I do it?

Thanks allot for the help
1 Solution
What code are you trying to use?

What version of CR?  What version of VB?

There are many ways to connect VB to Crystal.

The main impact on the deployment is the need to install and register the DLLs and Active X controls used by VB to display the report.

The report can be displayed in a preview screen, sent directly to the printer, exported to various formats including Word and Excel.

It sounds like you are just getting started using VB and Crystal. I would recommend looking at some of the samples provided on the CR web site.  They have full VB applications available that you can download, look at, change, and run to learn how to connect VB and Crystal.


A couple of the samples are



I find using the ActiveX control the easiest simply because I have used it for some time.  I have also used the CR RDC.  

The RDC is the newest method and the preferred from CR's perspective.  

You can change where the report is looking, the query, and many other things.  the method of doing so varies depending on the method chosen to connect to CR.

If you have specific questions feel free to add them or ask new ones.

good luck
FRNRIC005Author Commented:
Hi mlmcc

Thanks for your suggestions and you are absolutely correct, I am still new to using Crystal Reports!

I have been pouring over the sample programmes you have sent me and I am able now to bring up a report in the Viewer. I am trying to display a report that has a main report and two sub reports which are linked to the primary key in the primary report. Unfortunately I cant seem to get the report to show upto date data. I dont hink it is accessing the database.

Do I have to do something programmaticaly in VB to make the report access the database, or is it a report setting?

Do I have to re-link all the subreports tot he primary report programmaticaly, or will the report just do it?

Also, one of the methods in the sample programme wont work:


I'm told that the method is not found.

Can you help me with these problems?

You will be well reward with points if you can hlp me solve this problem!


Do I have to do something programmaticaly in VB to make the report access the database, or is it a report

Check the report to ensure you don't have SAVE DATA WITH REPORT checked.  It is under the FILE menu.

Do I have to re-link all the subreports tot he primary report programmaticaly, or will the report just
do it?

You shouldn't have to, the report should maintainthe links.  I have several reports with subreports and use the same code to display them that I use for reports without subreports.


If the above is from your code you misspelled one word.  Try


I haven't used that feature so if that doesn't work I wouldn't know.  When you type crxReports. does parameterfields show up as an option?  If it does does getitembyname show up after you type the .?

good luck
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mlmcc's comment(s) as an answer.

FRNRIC005, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
DanRollins -- EE database cleanup volunteer
Moving to the paq

Experts Exchange Moderator
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.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now