CollectionSpace Reporting

February 2, 2017

Reporting on collection data managed with CollectionSpace is complicated by the variation of data models and collection types used by diverse museums and collections that employ the software. Flexible modes of generating reports -- from use of the built-in JasperReports reporting tool or extension points in the codebase, to development of web applications that address the CollectionSpace API or database -- allow users to address this complexity in ways that best suit their collection and institutional workflow.

Reporting is a fundamental part of managing a collection. Reports are essential for common business activity such as creating exhibition labels, producing loan agreements forms, or generating lists for managing inventory. Furthermore, the right report can aid an administrator in determining ways to streamline workflows and improve efficiency, formulating governance policies, and promoting the collection to funding agencies and the public. Analysis of organized data and summaries provided by reports can lead to meaningful insights that affect day-to-day operations and administrative policies.

Reporting needs can also surface issues with the underlying data model and data quality in a collections management system. If the question one wants to ask of the data cannot be answered because the data do not exist or are not in a format that can be queried, these structural problems must be addressed before useful reports can be generated. Other complications arise if inconsistent, invalid, or missing data complicate composition of a workable query. Variations in data, unexpected data, and missing data in reports may call attention to data quality and integrity issues.

CollectionSpace provides reporting functionality in several ways. Both a query component to extract the data from a database, and a formatting component to present it, are needed to build a report. These components can be realized using many different methods and tools. Early in its development, reporting was integrated into the CollectionSpace user interface. The current 4.4 version includes a set of basic canned reports built with JasperReports. For custom reports, there are three recommended options: 1) employ JasperReports tools; 2) create a web application; or, 3) add custom code via CollectionSpace extension points.

Employing JasperReports, an open source Java reporting tool developed by Jaspersoft, is an easy way to create custom reports. Its GUI tools enable users to format the report layout and write the report query needed to build a customized report without the need to write Java code. JasperReports can use input from many source types such as a relational database or delimited text file, and it can produce reports in a variety of formats including Microsoft Word, PDF, and XML.

Specimen labels generated by invoking a JasperReport from the CollectionSpace UI

Specimen labels generated by invoking a JasperReport from the CollectionSpace UI.

Another way to generate reports is via a customized web application which can interface with CollectionSpace APIs or connect directly to the CollectionSpace database. Creating a web application is a good way to generate interactive reports that allow the user to adjust multiple parameters. The UC Botanical Garden Bed List report, developed by Research IT developer John Lowe, is an example of a custom webapp. The report produces an inventory list of specimens by bed location and includes other options such as filters for living and rare specimens.

The UC Botanical Garden Bed List Report webapp showing a truncated list of live and not rare specimens in the “3A, Vernal Pool, Californian” bed location

The UC Botanical Garden Bed List Report webapp showing a truncated list of live and not rare specimens in the “3A, Vernal Pool, Californian” bed location.

At UC Berkeley, all CollectionSpace webapps are being migrated into Django, a Python-based web application framework. These Django webapps can be previewed at: https://webapps.cspace.berkeley.edu (see screenshot at the top of this article).

CollectionSpace also offers extension points for adding or extending functionality via SQL scripts, batch jobs, and event listeners/handlers. Many deployments have used this option as a way to migrate reports created for a prior collection management system. At UC Berkeley, the University and Jepson Herbaria migrated their California Consortium of Herbaria report by making changes to an existing script so that it would query the CollectionSpace data model instead of a prior system’s database, then deployed the script as a cron job.

Using these varied methods, CollectionSpace deployers have developed a large number of customized reports formatted as labels, forms, lists, and summaries which aid in day-to-day operations as well as facilitate management planning and policy development for their specific collections. Moreover, these reports have indeed provided evidence of flaws in the data model and the data itself, illuminating areas in need of improvement.