Versions Compared

Key

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

...

In the query above, the tenant ID has been specified as a property in the iReport toolJaspersoft Studio, and then the property value is used in the query. CollectionSpace will pass in the current tenant ID when the report is run from on the UICollectionSpace server, so we can re-use the same report for different tenants in the system. For your testing, set the tenantid property to have a default value of corresponding to the tenantid tenant you most commonly use. This tenantid id is the one specified in the tenant configuration file for the services, for your tenant. See also: Creating your new tenant.

You will also note an additional "where_clause" parameter. This is used to pass in specific id values, when the report is to be run on a particular record. In the sample report provided in the v5.x releasereports provided with CollectionSpace, this parameter often has the following a default value like:

Code Block
(($P{csid} == null || ($P{csid}.length() == 0)) ? "" : " AND hierarchy.name = '" + $P{csid} + "'")

This The effect of this definition is to look for a passed csid value csid parameter passed in from CollectionSpace, and produce a report on that single acquisition record if it is set. If the value is not set by CollectionSpace (when the report is run without any context), it runs a the report is run on all acquisition records of a certain type. Authoring this a report this way allows it to be run either for a selected acquisition single record, OR or without a context (from the report admin UI, available in an upcoming releaseTools/Reports screen).

There is currently an example report (with more to come) as part of the CollectionSpace distributionare currently several reports installed with CollectionSpace. You can see the v5.x version of this report these reports (and download /copy it them to review view in iReportJaspersoft Studio) here in the CollectionSpace source code repository. You can also find the compiled version where you have installed CollectionSpace. It (and all reports you author and want to use in CollectionSpace) are located in the directory: cspace/reports within the Tomcat installation directory. If you open the compiled version in iReport, it will convert it to a jrxml file for you, and let you review and/or edit the report.

Preparing reports for running from within CollectionSpace

...