Exporting Report Templates Using phpPgAdmin

Once the data is exported. Database Administrators/Systems Administrators can easily import this data into the templates folder to make it available in the client.

Dump the Entire Reports Template Table

The data exported in this method can create issues importing into a different system if you do not have a matching folder and owner. This is going to export report templates created in your system. The most important fields for importing into the new system are name, description, and data. Data defines the actual structure of the report. The owner and folder fields will unique to the system they were exported from and will have to be altered to ensure they match the appropriate owner and folder information for the new system.

  1. Go to the Reporter schema. Report templates are located in the Template table

  2. Click on the link to the Template table

  3. Click the export button at the top right of the phpPgAdmin screen

  4. Make sure the following is selected

    1. Data Only (checked)

    2. Format: Select CSV or Tabbed did get the data in a text format

    3. Download checked

  5. Click export button at the bottom

  6. A text file will download to your local system

Dump Data with an SQL Statement

The following statement could be used to grab the data in the folder and dump it with admin account as the owner and the first folder in your system.

SELECT 1 as owner, name, description, data, 1 as folder FROM reporter.template

or use the following to capture your folder names for export

SELECT 1 as owner, t.name, t.description, t.data, f.name as folder
	FROM reporter.template t
	JOIN reporter.template_folder f ON t.folder=f.id
  1. Run the above query

  2. Click the download link at the bottom of the page

  3. Select the file format (CSV or Tabbed)

  4. Check download

  5. A text file with the report template data will be downloaded.