Indigo DRS Data Reporting System Indigo DRS
Report Rules Indigo DRS Help

Report Rules are conditional XQuery or Python expressions that determine if Report content is enabled and applied to the build. Rule based queries return a Boolean that is either True or False and can query the Report Data Source and other Report Data Contexts. Rules are used for controlling the flow, visibility and activation of Report content.

For example, certain sections of a common report may only be relevant for a particular type of product or customer. Report Rules allow content to be controlled by switching it on or off depending on certain conditions in the Report Data.

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

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

Report Rules can be applied to all elements allowing flexible and conditional control of the Report build and output content.

Report Rules if empty or null by default will always return True.

Report Queries

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).

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 and Report Rules.

Report RDL Files

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

Click the Rules File (...) property button to specify the URI File or URI Query for shared Report Rules.

Content Types

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

Rules File

The Rules File represents a list of shared Report Rules 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.

Query Fields

Report Rules can also contain 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 from the Report Data Source.

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.