Page 1 of 1

Frame around TeeChart Control on Access reports

Posted: Tue Mar 29, 2011 5:04 pm
by 16657723
Hi,
I have an Access 2003 database with a TeeChart graph on a report.
The graph works fine but there is always a black frame around the TeeChart control.
Setting the frame to invisible in Access doens't help, neither "TChart1.Frame.Visible = False"
What can I do to get rid of this?
Thanks,
Andreas

Re: Frame around TeeChart Control on Access reports

Posted: Wed Mar 30, 2011 2:33 pm
by 10050769
Hello Andreas,

Could you please, send us a simple project we can run as-is to reproduce the problem here? Moreover, you can tell which version of TeeChart Activex are you using now?

Thanks,

Re: Frame around TeeChart Control on Access reports

Posted: Mon Apr 04, 2011 12:32 pm
by 16657723
Hi Sandra

Enclosed is a sample project with some problems/questions that I presently have with version 2010.0.0.3:

1) The frame mentioned before is actually a half-frame (lines at right and bottom) that you see when you open "Report1" in print preview

2) Most properties set with the Editor are lost as soon as the report is closed, rendering the editor useless. Is there a way to save the chart properties?

3a) In my sample DB - to avoid ADO datasources - I assign all values to arrays which are then passed using Series.AddArray. I do however get data conversion errors as soon as I want to pass a NULL value (with the Array defrined as Variant). The same occurs when passing the data directly with AddValue. How can I pass the data preserving NULL values?
3b) The above procedure works with numeric X-axis values only. Sometimes X axis is a series of strings. How can I pass those?

Thanks for your help!
Andreas

Re: Frame around TeeChart Control on Access reports

Posted: Mon Apr 04, 2011 2:25 pm
by narcis
Hi Andreas,
1) The frame mentioned before is actually a half-frame (lines at right and bottom) that you see when you open "Report1" in print preview
You need to set outer bevel to non-visible:

Code: Select all

TChart1.Panel.BevelOuter = bvNone
2) Most properties set with the Editor are lost as soon as the report is closed, rendering the editor useless. Is there a way to save the chart properties?
Which properties don't persist? Saving the report at designtime after using the editor works fine for me here.
3a) In my sample DB - to avoid ADO datasources - I assign all values to arrays which are then passed using Series.AddArray. I do however get data conversion errors as soon as I want to pass a NULL value (with the Array defrined as Variant). The same occurs when passing the data directly with AddValue. How can I pass the data preserving NULL values?
Null values in a database must be customly handled as almost everybody marks them in a different way and also everybody wants to treat them in a different way. So you should loop through your datasource and when a null value is identified, you should manually add it to the series using the AddNull methods provided. Alternatively you can set existing points to null using SetNull(ValueIndex) method. Finally, you can use TreatNulls property for choosing how do you want null values to be displayed.
3b) The above procedure works with numeric X-axis values only. Sometimes X axis is a series of strings. How can I pass those?
Don't pass X values to the series, just provide Y values and use strings as point labels. TeeChart will automatically generate sequential values as X values. If those are required you can provide them yourself: 0, 1, 2, 3, 4, etc.

Re: Frame around TeeChart Control on Access reports

Posted: Thu Apr 07, 2011 6:21 pm
by 16657723
Hi Narcis

Thanks for the quick reply.

"Which properties don't persist? Saving the report at designtime after using the editor works fine for me here."

I was using the trial version. With the production version there is no problem with saving the properties. Something new that appeared now
is a grey background in the print preview that is not visible in design view - I solved this with setting the Panel color to white at runtime.

Thanks again,
Andreas