Is it possible to save and load, not only the chart 'template', but all information regarding the configuration of a chart? This would include what 'kind' of datasource (single record, dataset, summary, crosstab, etc.) and the name of the dataset (query1 or table1) along with the source of the apprpropriate values.
I have an application in which I wish to be able to save a configured chart, which may be, say a crosstab with data from a query, to a database. I then want the user to be able to load the chart from the database fully configured. I have tried to do this with save/loadchartfromfile, save/loadchartfrom stream, etc., but when the chart is reloaded, the user still has to configure the datasource source, whether it is a crosstab, summary, etc and the source fields for xvalues, yvalues, etc.
Thanks,
Dennis
saving and loading of entire chart
Re: saving and loading of entire chart
Hi Den,
The possibility to save also the connection info in the tee file when you export your chart is a feature already in the wish list to be implemented in future releases (TV52014739).
I've incremented it's priority.
The possibility to save also the connection info in the tee file when you export your chart is a feature already in the wish list to be implemented in future releases (TV52014739).
I've incremented it's priority.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: saving and loading of entire chart
Thanks, Yeray.
I would imagine in order to do this now, one would have to:
- store the tee template
- iterate through the form components to see if a dbcrosstab component existed, was assigned a series and was active --> therefore a crosstab type chart
- determine if the xvalues had "#" in them --> therefore a summary type chart
- otherwise it is most likely a simple dataset chart
- store the above, along with the connection info (including the dataset info - query sql)
- based on the stored values above, set the necessary 'properties' of the chart upon loading
To your knowledge, has this been done by anyone before, or have any hints as to how to do it now. It would be a lot easier if there were some property of the chart which would tell you what 'kind' it was, as the datasource tab of the editor does when selecting 'manual', 'random', 'single record', 'dataset', etc.
Thanks,
Dennis
I would imagine in order to do this now, one would have to:
- store the tee template
- iterate through the form components to see if a dbcrosstab component existed, was assigned a series and was active --> therefore a crosstab type chart
- determine if the xvalues had "#" in them --> therefore a summary type chart
- otherwise it is most likely a simple dataset chart
- store the above, along with the connection info (including the dataset info - query sql)
- based on the stored values above, set the necessary 'properties' of the chart upon loading
To your knowledge, has this been done by anyone before, or have any hints as to how to do it now. It would be a lot easier if there were some property of the chart which would tell you what 'kind' it was, as the datasource tab of the editor does when selecting 'manual', 'random', 'single record', 'dataset', etc.
Thanks,
Dennis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: saving and loading of entire chart
Hi Dennis,
I'm not aware of anyone having done before. The only solution I can think of for now is manually assigning datasources after loading a template chart. One of the problems with this feature is that TeeChart native template files may be loaded in machines different to the one which generated them and required datasources may not exist there. However, you can already choose whether you want to include series data when exporting a chart. There are programmatic datasource setting examples in the database related tutorial. Tutorials can be found at TeeChart's program group.
I'm not aware of anyone having done before. The only solution I can think of for now is manually assigning datasources after loading a template chart. One of the problems with this feature is that TeeChart native template files may be loaded in machines different to the one which generated them and required datasources may not exist there. However, you can already choose whether you want to include series data when exporting a chart. There are programmatic datasource setting examples in the database related tutorial. Tutorials can be found at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |