Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Copy the .jrxml file to the reports directory on the server. Report files should be installed in the cspace/reports directory under the Tomcat directory (whose path should be in the CSPACE_JEESERVER_HOME environment variable). Note the name of the file, e.g., "acq_basic.jrxml".

  2. Create a report metadata XML record to register the report with CollectionSpace. This record contains information about the report, so that CollectionSpace knows how to run it. You will need to run a curl command to send the record to the server's REST API. The following example declares that the report "acq_basic.jrxml" should be shown to users when they are editing Acquisition records. Set the outputMIME value to the desired default output type for the report. This can be any output type supported by JasperReports.

...

  1. CollectionSpace admins and any other users with Utility Resources > Reports > Write permission can use the following command to create the report record in CollectionSpace:

    1. Replace http://localhost:8180 with the base url of your CollectionSpace instance.

    2. Replace {username} with your CollectionSpace user name and {password} with your password.

    3. This assumes you have saved the XML file discussed above as "

...

    1. acq_basic.xml"

...

    1. and are running the command from the directory containing the file.

Code Block
curl -X POST http://localhost:8180/cspace-services/reports
  -i -u admin@{yourtenantusername}.collectionspace.org:{password}
  -H "Content-Type: application/xml" -T reportacq_basic.xml

Installing reports automatically

...