Solved

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

Posted on 2001-06-24
6
251 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
[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
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

724 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