Solved

Intergating XCrystal Reports into VB

Posted on 2002-03-14
5
130 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

813 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

10 Experts available now in Live!

Get 1:1 Help Now