]> git.evergreen-ils.org Git - Evergreen.git/blob - docs-antora/modules/reports/pages/reporter_export_usingpgAdmin.adoc
LP#1848524: Docs: Fix sections for Antora: "reports"
[Evergreen.git] / docs-antora / modules / reports / pages / reporter_export_usingpgAdmin.adoc
1 = Exporting Report Templates Using phpPgAdmin =
2 :toc:
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 The data exported in this method can create issues importing into a different 
13 system if you do not have a matching folder and owner. This is going to export 
14 report templates created in your system. The most important fields for importing 
15 into the new system are _name_, _description_, and _data_. Data defines the actual 
16 structure of the report. The _owner_ and _folder_ fields will unique to the system 
17 they were exported from and will have to be altered to ensure they match the 
18 appropriate owner and folder information for the new system.
19
20 . Go to the *Reporter* schema. Report templates are located in the *Template* table
21 . Click on the link to the *Template* table
22 . Click the *export* button at the top right of the phpPgAdmin screen
23 . Make sure the following is selected
24 .. _Data Only_ (checked)
25 .. _Format_: Select _CSV_ or _Tabbed_ did get the data in a text format
26 .. _Download_ checked
27 . Click _export_ button at the bottom
28 . A text file will download to your local system
29
30 == Dump Data with an SQL Statement ==
31
32
33 The following statement could be used to grab the data in the folder and dump it 
34 with admin account as the owner and the first folder in your system.
35
36 -------------
37 SELECT 1 as owner, name, description, data, 1 as folder FROM reporter.template
38 -------------
39
40 or use the following to capture your folder names for export
41
42 --------------
43 SELECT 1 as owner, t.name, t.description, t.data, f.name as folder 
44         FROM reporter.template t 
45         JOIN reporter.template_folder f ON t.folder=f.id
46 --------------
47     
48 . Run the above query
49 . Click the *download* link at the bottom of the page
50 . Select the file format (_CSV_ or _Tabbed_)
51 . Check _download_
52 . A text file with the report template data will be downloaded.
53
54