Indigo DRS Data Reporting System Indigo DRS
Report Queries Indigo DRS Help

The Report Data Source can be queried using XQuery / XPath or Python statements.

Report Queries are declared globally in the Report or by specifying a shared Report RDL File.

To add, edit or insert a Report Query click on the Report Designer tree-view and select the Report Queries node and then click the menu Edit | New, Insert or Edit Query.

Report Queries are associated with Report Fields and the output of a query will be substituted in place of the Report Field Name.

Report Query using XQueries / XPath

XQuery is a query and functional programming language that is designed to query and transform collections of structured and unstructured data, usually in the form of XML (Extensible Markup Language).

If the Report Query type is an XQuery the XQuery Designer will be used to edit the Report Query.

Selecting a node in the Data Tree will update the current XPath for that node. The XPath expression can then be used to query the Report Data Source.

XQuery provides the means to extract and manipulate data and contains a superset of XPath expression syntax to address specific parts of an XML document.

Click OK to update the Report Query.

Report Query using Python

If the Report Query type is Python then Python scripting will be used. The Report Data Context will be passed into the Python Editor for querying using Python.

IronPython can use the .NET Framework and Python libraries, and other .NET languages can use Python code just as easily. Python scripting can be used to query Report Data and create Report Data Contexts.

The Python Editor allows Python Functions to be inserted and the script to be validated and executed displaying the output as it will be used in the Report.

Report RDL Files

Report Queries exported using the Export Wizard can also be reused as a shared Resource File by setting the File property of the Queries File to the exported or saved RDL content.

Click the Queries File property button to specify the URI File or URI Query for shared Report Queries.

Content Types

Content Types can be either a Literal or a File for the Report Query. If the Content Type is a File the content for the Report Query is read from the specified File URI.

Query Fields

Report Queries can also contain Fields within Fields which can be used to substitute content in the Report Query. XQuery and / or XSLT, Python can be used in Report Fields and provides the means to extract and manipulate data.

Queries File

The Queries File represents a list of shared Report Queries exported or saved as Report RDL elements which can be reused and shared between other Reports.

File URI's

Report File URI's are expressed as Uniform Resource Identifiers (URI) and can be either a Literal or a Query to specify the location of the File Resource. Literal values are constants that are determined by the URI File property.

Query based URI's are determined by the result of the URI Query which can be a series of XQuery or Python statements to specify the location of the File URI.

Report Caching

Report elements can cached to improve the speed and performance of Report builds. Caching stores a copy in memory of frequently used content instead of reading the file directly from disk.

Report Namespaces

Report Namespaces are used for providing uniquely named elements and attributes and is a mechanism to avoid name conflicts by differentiating elements or attributes within an XML document that may have identical names, but different definitions. If the Report Data Source contains namespaces they can be applied to the XQuery Processor.