Solved

Intergating XCrystal Reports into VB

Posted on 2002-03-14
5
128 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
5 Comments
 
LVL 100

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 100

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now