Learn to configure Ad Hoc report configuration locations, the maximum number of report results, JNDI Data Sources, logging and more.
Pull Reports™ reads the pullreports.properties
file from the root
of the JVM classpath on startup. Two properties are always required. The catalogs
property lists the available Pull Reports™ catalog configurations and the jndiDataSource
property specifies the
javax.sql.DataSource
used to fulfill the requests to the Pull Reports REST API.
This example pullreports.properties
file configures three
Pull Reports™ XML Catalog files, two located on the JVM classpath and one available via a network URL and
one Catalog Configuration Java API
CatalogConfigurationFactory.
Additionally, the file specifies the java:comp/env/jdbc/my-datasource
JNDI resource
to fulfill requests to the Export Report REST API.
catalogs=classpath:reports/class-information-catalog.xml \ classpath:reports/student-information-catalog.xml \ http://www.yourcompany.com/common-pullreports-catalogs/enrollment-information-catalog.xml \ factory:com.yourcompany.pullreports.FacilityCatalogConfigurationFactory jndiDataSource=java:comp/env/jdbc/my-datasource
catalogs
Required
White space separated list of catalog configuration references to be parsed on Servlet initialization. Each catalog configuration reference is either:
Proceeded with classpath:
to indicate a Pull Reports™ XML Catalog file file
available on the JVM classpath. A common classpath location for Pull Reports™ XML Catalog files
is the installation WAR's WEB-INF/classes
directory.
Any valid
java.net.URI
to a Pull Reports™ XML Catalog file.
Use this method to load a Pull Reports™ XML Catalog file from a file external
to the WAR or from a URL.
The fully qualified name of a Java class proceeded with the term factory:
.
The factory class must either implement the
CatalogConfigurationFactory
interface or meet both of the following criteria:
The factory class must have a constructor which takes a
jakarta.servlet.ServletContext
as its single argument.
The factory class must have a public, no-argument method called
makeCatalog
which returns a java.io.Reader
.
Pull Reports™ will parse the Pull Reports™ XML Catalog file document from the Reader.
jndiDataSource[.catalogId][.reportId]
Required
JNDI location (e.g. java:comp/env/myDatasource
) of a
javax.sql.DataSource
to be used by the Pull Reports REST API.
To use one DataSource
for all reports,
simply specify a single jndiDataSource
property. To customize
the value per-<catalog>
or per-<report>
, (.) append the catalog id
and, optionally, the report id
to the property name respectively.
creator.url[.catalogId][.reportId]
Optional
The URL path to the Report Creator installation web page. If specified, the
html
,
map
,
and htmltree
export formats output a hyperlink to the Report Creator appended with the export's
query parameters.
creator.url
configurationcreator.url=/reports/creator.html
export.report.include.(...)
Optional
Allows decoration of the Export Report REST API html
,
htmltree
,
and map
formats via Servlet includes.
See the export decoration documentation for more details.
export.report.maxResults[.catalogId][.reportId]
Default: 200000
The maximum allowed number of results to be returned from the Export Report REST API.
Must be an Integer value. A value less than 0 indicates no maximum. If not set,
the default value is 200000
.
export.report.postgresql.queryCostMaximum[.catalogId][.reportId]
Default: 50000
The maximum permitted value of the PostgreSQL explain plan's total cost for database queries formulated by the Export Report REST API. A value of less than 0 indicates no maximum. If not set, the default value is 50000. A query which exceeds the maximum will terminate the request and return an HTTP response status code of 400.
This property is only applicable for connections to a PostgreSQL database.
export.sql.active[.catalogId][.reportId]
Default: false
Boolean (true|false) value which controls the availability of the
GET Export SQL API.
If set to false
, the default, a
request to the API will return an HTTP status code of 404, Not Found
.
Only set export.sql.active
to true after properly securing
the GET Export SQL API. Since the API returns raw SQL, it may aid attackers
in mounting SQL based attacks.
license.evaluation.mode
Default: true
Boolean (true|false) value which controls whether a Pull Reports™ Community Edition deployment is run in evaluation mode.
license.file
Default: classpath:pullreports.license
The location of the Pull Reports™ license file
for Pull Reports™ Standard Edition deployments.
The value must start with classpath:
to indicate the provided file
location is available on the Java Virtual Machine classpath.
If not provided, the default value is classpath:pullreports.license
which means Pull Reports™ expects a file named pullreports.license
at the
root of the JVM classpath.
static.resource.prefix
Optional
The resource path prefix used by the map
and
html
export formats
when creating paths to Pull Reports™ JavaScript and CSS resources.
The default value is the empty String. The value must be set to /static
for a Grails 4 installation.
In a basic WAR installation,
the Servlet Container serves static resources within the
pullreports-x.y.z.jar!META-INF/resources
directory from at the root of the WAR's context path.
Links to these resources are used within Export Report REST API formats which
write HTML documents.
Within a Grails 6 Installation,
the same resources are served under the /static
path. Setting
static.resource.path=/static
correctly prepends /static
to the resource URLs
system.jndiDataSource
Required for user query support
JNDI location (e.g. java:comp/env/pullreports
) of a
javax.sql.DataSource
to persist
user queries.
system.userProvider
Default: com.pullreports.userquery.DefaultUserProvider
The implementation of com.pullreports.userquery.UserProvider Pull Reports™ will use to resolve the user identifier from the HttpServletRequest before persisting a user query.
system.userQueriesSchema
Default: pullreports
The schema or user namespace of the user_queries
table.
The value will be prepended to the user_queries
table name when persisting and selecting
user queries.
To unset, set to the empty string (e.g. system.userQueriesSchema=
).
Any property documented with a [.catalogId][.reportId]
suffix may be overridden for all <report>
s within a <catalog>
or a specific
<report>
by (.) appending the catalog id
and, optionally, report id
to the property name.
For example, the following configuration sets the global export.report.maxResults
to 10000
rows, overrides the value for all reports in <catalog>
myCatalog
to 2000, and then
overrides the catalog value for <report>
myReport
in myCatalog
to 3000.
export.report.maxResults=10000 export.report.maxResults.myCatalog=2000 export.report.maxResults.myCatalog.myReport=3000