]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/reports/reporter_export_usingpgAdmin.adoc
Change all docs filenames to .adoc
[Evergreen.git] / docs / reports / reporter_export_usingpgAdmin.adoc
1 Exporting Report Templates Using phpPgAdmin
2 -------------------------------------------
3
4 indexterm:[reports, exporting templates]
5
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 
8 client.
9
10 Dump the Entire Reports Template Table
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12
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.
20
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
27 .. _Download_ checked
28 . Click _export_ button at the bottom
29 . A text file will download to your local system
30
31 Dump Data with an SQL Statement
32 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
34
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.
37
38 -------------
39 SELECT 1 as owner, name, description, data, 1 as folder FROM reporter.template
40 -------------
41
42 or use the following to capture your folder names for export
43
44 --------------
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
48 --------------
49     
50 . Run the above query
51 . Click the *download* link at the bottom of the page
52 . Select the file format (_CSV_ or _Tabbed_)
53 . Check _download_
54 . A text file with the report template data will be downloaded.
55
56