1 Exporting Report Templates Using phpPgAdmin
2 -------------------------------------------
4 indexterm:[reports, exporting templates]
6 Once the data is exported. Database Administrators/Systems Administrators can
7 easily import this data into the templates folder to make it available in the
10 Dump the Entire Reports Template Table
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 The data exported in this method can create issues importing into a different
14 system if you do not have a matching folder and owner. This is going to export
15 report templates created in your system. The most important fields for importing
16 into the new system are _name_, _description_, and _data_. Data defines the actual
17 structure of the report. The _owner_ and _folder_ fields will unique to the system
18 they were exported from and will have to be altered to ensure they match the
19 appropriate owner and folder information for the new system.
21 . Go to the *Reporter* schema. Report templates are located in the *Template* table
22 . Click on the link to the *Template* table
23 . Click the *export* button at the top right of the phpPgAdmin screen
24 . Make sure the following is selected
25 .. _Data Only_ (checked)
26 .. _Format_: Select _CSV_ or _Tabbed_ did get the data in a text format
28 . Click _export_ button at the bottom
29 . A text file will download to your local system
31 Dump Data with an SQL Statement
32 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 The following statement could be used to grab the data in the folder and dump it
36 with admin account as the owner and the first folder in your system.
39 SELECT 1 as owner, name, description, data, 1 as folder FROM reporter.template
42 or use the following to capture your folder names for export
45 SELECT 1 as owner, t.name, t.description, t.data, f.name as folder
46 FROM reporter.template t
47 JOIN reporter.template_folder f ON t.folder=f.id
51 . Click the *download* link at the bottom of the page
52 . Select the file format (_CSV_ or _Tabbed_)
54 . A text file with the report template data will be downloaded.