Solved

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

Posted on 2001-06-24
6
244 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

810 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