Solved

specify database location for Crystal Report Chart in VB at runtime

Posted on 2002-05-13
5
343 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
[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
5 Comments
 
LVL 101

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 101

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 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