Solved

Updating report (made in Crystal Reports) from inside Visual Basic

Posted on 2001-06-24
6
239 Views
Last Modified: 2013-11-25
I have written an addressbook application (in Visual Basic 5), in which Crystal Reports Control is used. Same database (MS Access) is used in the Addressbook and the report. If I edit data in the addressbook application, to update the report I have to come out of the Visual Basic application, and update the report in Crystal Reports.
Can I update the report from inside my Visual Basic application. If so, how?
0
Comment
Question by:Bhowal
  • 3
  • 2
6 Comments
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 100 total points
ID: 6223028
In Crystal Reports, on the File menu turn off the option to Save Data with Report.  Save the report (without the data) and try to run your report again.
0
 
LVL 14

Expert Comment

by:profya
ID: 6223707
DRRYAN3 covered a part of the problem, to turn off "Save Data with Report" option. But in many cases you set up your application in a diffrent place than the one you used to dvelop the application. So you may need to dynamically link your application anywhere to it's reports regardless of the location they installed in. Let's say you save your report files in the same folder that contains the application then you need -to dynamically link your application to it's report- to set the following Report control properties:

CrystalReport1.Connect = RPTConnect'Your connect string
CrystalReport1.ReportFileName = App.Path & "\AddressBook.rpt"
CrystalReport1.WindowState = crptMaximized
CrystalReport1.PrintReport


and example for a valid connect string for Access password-protected database is RPTConnect  = ";pwd=MyPassword"
Try it.
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6224645
Bhowal - please reject profya's proposed answer (unless it exactly matches your needs).

Profya - I can see that you are fairly new to EE.  In the VB areas, the experts generally do not use the Answer button, but rather the Comment feature to allow as much input from as many people as possible.  When you propose an answer, the question moves out of general circulation.

See the links below for more information on comments and answers.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 14

Expert Comment

by:profya
ID: 6226992
DRRYAN3,
Yes I'm a new comer in the EE. I'm not gonna block a question once again.
0
 

Author Comment

by:Bhowal
ID: 6227872
Thanks Profya. However,I accept DRRYAN3's comment which solves my problem.
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6227911
Glad your problem was solved.  Thanks for the points.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 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…

744 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

12 Experts available now in Live!

Get 1:1 Help Now