There are many circumstances where you will want to move a group of templates, or a complete installation of EspressChart from one location to another. For example an application may move from a development to a test to a production environment. In each environment the location and connection information for data sources may change. In this scenario, updating chart templates one-by-one as detailed in the previous section isn't a feasible way to change the connection information for a large number of templates. Instead, EspressChart allows you to quickly update a group of templates based on information in the data registry.
Although chart templates maintain an internal copy of the data source information (allowing them to be deployed independently) they also maintain information (location & source) about the data registry from which they were created. Hence, when you modify a chart's query (as detailed in Section 4.2.4 - Editing Queries) you have the option to save the changes back to the data registry. In order to use this feature, you will have to keep your data registry up to date. This means that query changes should be saved back to the registry, and changes in data view structure should be propagated to data view queries as detailed in Section 4.2.3.2 - Updating Data View Queries
To use this feature, first make any modifications to the data registry that you would like to propagate to the chart templates. These modifications can include database connection information, file locations for text, XML data files, and even changes to data views or queries that you would like to pass to the templates. Note that if you're moving charts between installations, the data registry file will need to be moved to the same relative location in the new installation. In addition the associated query files for that registry (.qry
/.dvw
/.ddt
) will need to be moved to the /queries/
directory of the new installation. (Query file names begin with the name of the registry).
From the data source manager, select
→ . This will bring up a dialog allowing you to select which charts you would like to update.To select charts to update, first browse to the directory that contains the charts. After you select a directory, any chart templates will appear in the left-hand side of the dialog You can select any templates that you would like to update, and click the Connection Info Only option will update only the connection information (database URL, driver, username, password, and locations for XML files, text files and Java classes). Queries and data view information will not be updated in the templates.
button. You can navigate to as many different directories as you would like to select templates. Selecting theOnce you have finished selecting the templates you would like to update, click
and the updating process will begin. A dialog shows the progress showing which templates are updated and catching any errors.A log file named UpdateDataSources
will also be written in the root directory of the installation with the contents of the progress screen. charts that fail the updating for various reasons, can be updated manually using the option in Chart Designer.
Note | |
---|---|
Only charts for the current data registry will be modified. If you select charts that do not retrieve their data from a source in the current registry they will be ignored. |