Solved

Intergating XCrystal Reports into VB

Posted on 2002-03-14
5
134 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:FRNRIC005
[X]
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
5 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 100 total points
ID: 6864588
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.

http://support.crystaldecisions.com\
look under SUPPORT  ->  SELF-SERVE SOLUTIONS ->  DOWNLOAD FILES AND UPDATES

A couple of the samples are

http://support.crystaldecisions.com/communityCS/FilesAndUpdates/cr_print_from_explorer.exe.asp

http://support.crystaldecisions.com/communityCS/FilesAndUpdates/cr8_vb_rdc_parameter.exe.asp

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
mlmcc
0
 

Author Comment

by:FRNRIC005
ID: 6867644
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:

crxReports.parrameterfields.getitembyname("Id")

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!

Thanks

0
 
LVL 101

Expert Comment

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

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.

crxReports.parrameterfields.getitembyname("Id")

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

crxReports.parameterfields.getitembyname("Id")

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
mlmcc
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7618288
Hi FRNRIC005,
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
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7665730
Moving to the paq

kb
Experts Exchange Moderator
0

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.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

707 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