Solved

specify database location for Crystal Report Chart in VB at runtime

Posted on 2002-05-13
5
338 Views
Last Modified: 2012-08-13
hi guys,

I use Crystal Report control in my VB app to plot a chart with data from a database (mdb) located at app.path. At design time I specified the database location inside Crystal Report Designer in VB like this:- "Designer -> Database Fields -> Set Locaton -> File: ChartData!.\DBName.mdb". I believe the ".\" equivalent to App.Path. And I plot the chart using Chart Expert at design time. This approach works fine in Windows 98, NT and 2000. However, in XP, it gives me the follow error: File could not be found: "ChartData", at file location: "ChartData". Is there anyway I can specify the DB location and plot the chart at runtime using VB code instead of at design time. Thanks in advance! :)
0
Comment
Question by:ahpui
  • 3
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 7007396
Yes there is.  What controls are you using in VB to call the report?

It sounds like the RDC.

The RDC object has a SetDataSource method.

This link may help

http://support.crystaldecisions.com/library/kbase/articles/c2002296.asp

mlmcc
0
 

Author Comment

by:ahpui
ID: 7007461
yes, I use RDC.

After I specified the location of the Database, how can I plot the chart programmatically? At design time I can use the Chart Expert but how about at runtime??
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 7008458
0
 

Author Comment

by:ahpui
ID: 7016798
mlmcc,

I found out from one of the articles on the site you gave me. This is all I needed:

Report.Database.Tables(1).Location = "C:\myDatabase.mdb"

Thanks!

Still can't find anything about plotting a chart programmatically though. If you have any information on that please let me know. Later.
0
 

Author Comment

by:ahpui
ID: 7016799
not exactly what I am looking for but enough to get my problem solved. Thanks! :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

15 Experts available now in Live!

Get 1:1 Help Now