Report Queries and Datasources

An important section of the report defintion is the query, which is associated with a datasource. The query/datasource pair provides the raw data for the reporting engine, which is then parameterized and formatted vía other sections of the .jrxml file.

Datasources

The two datasources which are currently supported by evoReports are the Alfresco datasource and the JSON datasource. The Alfresco datasource is allows us to run reports based on supported Alfresco query languages, such as Lucene. The JSON datasource gives us an additional level of power and flexibilty by letting us connect to Alfresco webscripts, opening up the possibility of using JSON result data in a report.

Queries

The query section has two main pieces of information: the query type and the query itself. EvoReports supports various native Alfresco query types, which are run using the Alfresco motor at execution time.

The query section has the following appearance in our .jrxml file:
 

<queryString type="lucene">
   TYPE:"{http://www.alfresco.org/model/content/1.0}person" $P!{pWhere}
</queryString>

 


The type attribute tells the Jasper motor exactly which query language to use to interpret the query string at report run-time.

Supported datasources and query types

The following table lists the currently supported query languages and their corresponding type values:

Datasource Query language Query type attribute value
AlfrescoDataSource Lucene (http://wiki.alfresco.com/wiki/Search)  lucene
AlfrescoDataSource Cmis-alfresco (http://wiki.alfresco.com/wiki/CMIS_Query_Language)  cmis-alfresco
AlfrescoDataSource Cmis-strict (http://wiki.alfresco.com/wiki/CMIS_Query_Language) cmis-strict
AlfrescoDataSource Fts-alfresco (http://wiki.alfresco.com/wiki/Full_Text_Search_Query_Syntax) fts-alfresco
AlfrescoJsonDataSource JSON json-alfresco