Solved

specify database location for Crystal Report Chart in VB at runtime

Posted on 2002-05-13
5
340 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal Reports remove alpha characters only 5 56
Rounding duration within 20 min intervals 3 43
Help with a Crystal Report Formula 8 50
A string is required here error 20 21
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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