Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

The drill-linking extension provides a declarative way to specify the link target and its parameter in a declarative way. This way, the drill-link definition can be well-defined while at the same time its result can be computed.

The drill-link backend (pentaho-reporting-engine-extensions-

...

drill-down)

The link-computation is performed by a single formula function called "DRILDOWNDRILLDOWN".

Info
titleDRILLDOWN

Summary: Computes a drill-down link as text.

Syntax: DRILLDOWN (Text profileName; Text solution; Text reportPath; Text reportId; Array parameter )

Returns: TEXT

Constraints: Parameter-array is a 2x2 array with name value pairs.

Code Block
{{ "ParamName1" | "ParamValue1" } | { "ParamName2" | " ParamValue2" }}

Semantics: The actual work is done by the profile implementation in the background. Right now, there are two implementations, a simple pattern (message-format) profile and a formula based profile. The profile must be defined in the meta-data. Whether value of solution, reportPath and ReportId is actually used depends on the configuration of the profile given. The parameter array must be given, even if it is empty. Each profile is defined to compute a URL or to throw an Evaluation-Error if some of the values are illegal.

...

generic-url: a link to a third-party web-page on a server located somewhere remote. Report-Path and the parameter-values are used. Report-Path specifies the full URL, and parameters specify the parameter you want to pass.

Code Block

DRILLDOWN ("generic-url"; ""; "http://www.google.com/?"; ""; {{"q", "your-query"}})
Code Block

&nbsp; <drilldown-profile name="generic-url"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     class="org.pentaho.reporting.engine.classic.extensions.drilldown.PatternLinkCustomizer"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     bundle-name="org.pentaho.reporting.engine.classic.extensions.drilldown.drilldown-profile"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     expert="true" hidden="true" preferred="false" deprecated="false">
&nbsp;&nbsp;&nbsp;
    <attribute name="pattern">${1}${3}</attribute>
&nbsp;&nbsp;&nbsp;
    <attribute name="extension">xaction</attribute>
&nbsp;&nbsp;&nbsp;    <attribute name="parameter-encoding">urlencode</attribute>
&nbsp;  </drilldown-profile>

local-url: a link to a web-page on the same server. Report-Path and the parameter-values are used. Report-path specifies the local path relative to the "serverBaseURL".

Code Block

DRILLDOWN ("local-url"; ""; "/mywebapp/myownservlet?"; ""; {{"param",  "your-value"}})
Code Block

&nbsp; <drilldown-profile name="local-url"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     class="org.pentaho.reporting.engine.classic.extensions.drilldown.PatternLinkCustomizer"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     bundle-name="org.pentaho.reporting.engine.classic.extensions.drilldown.drilldown-profile"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     expert="true" hidden="true" preferred="false" deprecated="false">
&nbsp;&nbsp;&nbsp;
    <attribute name="formula">ENV(&quot;serverBaseURL&quot;)${1}${3}</attribute>
&nbsp;&nbsp;&nbsp;
    <attribute name="extension">xaction</attribute>
&nbsp;&nbsp;&nbsp;
    <attribute name="parameter-encoding">urlencode</attribute>
&nbsp;  </drilldown-profile>

local-xaction: A link to a xaction running on the same server and the same web-application. All parameter are used and inserted into the final URL.

Code Block

DRILLDOWN ("local-xaction"; "steel-wheels"; "test/dir"; "sample.xaction";  {{"param",  "your-value"}})
Code Block


&nbsp; <drilldown-profile name="local-xaction"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     class="org.pentaho.reporting.engine.classic.extensions.drilldown.PatternLinkCustomizer"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     bundle-name="org.pentaho.reporting.engine.classic.extensions.drilldown.drilldown-profile"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     expert="true" hidden="true" preferred="false" deprecated="false">
&nbsp;&nbsp;&nbsp;    <attribute name="formula">ENV(&quot;pentahoBaseURL&quot;) &amp; &quot;viewaction?solution=&quot; &amp; URLENCODE(\[&quot;::solution&quot;\]) &amp; &quot;&amp;path=&quot; &amp; URLENCODE(\[&quot;::reportPath&quot;\]) &amp; &quot;&amp;name=&quot; &amp;URLENCODE (\[&quot;::reportId&quot;\]) &amp; &quot;&amp;&quot; \[&quot;::parameter&quot;\]</attribute>
&nbsp;&nbsp;&nbsp;    <attribute name="extension">xaction</attribute>
&nbsp;&nbsp;&nbsp;
    <attribute name="parameter-encoding">urlencode</attribute>
&nbsp;  </drilldown-profile>

local-prpt: A link to a local PRPT with the parameter UI shown.

Code Block

DRILLDOWN ("local-prpt"; "steel-wheels"; "test/dir";  "sample.prpt";  {{"param",  "your-value"}})
Code Block

&nbsp; <drilldown-profile name="local-prpt"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     class="org.pentaho.reporting.engine.classic.extensions.drilldown.PatternLinkCustomizer"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     bundle-name="org.pentaho.reporting.engine.classic.extensions.drilldown.drilldown-profile"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     expert="true" hidden="true" preferred="false" deprecated="false">
&nbsp;&nbsp;&nbsp;
    <attribute name="formula">ENV(&quot;pentahoBaseURL&quot;) &amp; &quot;content/reporting/reportviewer/report.html?solution=&quot; &amp; URLENCODE(\[&quot;::solution&quot;\]) &amp; &quot;&amp;path=&quot; &amp; URLENCODE(\[&quot;::reportPath&quot;\]) &amp; &quot;&amp;name=&quot; &amp;URLENCODE (\[&quot;::reportId&quot;\]) &amp; &quot;&amp;&quot; \[&quot;::parameter&quot;\]</attribute>
&nbsp;&nbsp;&nbsp;    <attribute name="extension">prpt</attribute>
&nbsp;&nbsp;&nbsp;    <attribute name="parameter-encoding">paramvalue</attribute>
&nbsp; </drilldown-profile>


The drill-down profiles can be queried at runtime via the DrillDownProfileMetaData-API and can provide design-time hints to the UI, similar to the Metadata-API for Elements and Expressions. 

Drill-Down UI

The drill-down UI is a specialized editor for the DRILLDOWN function. The editor is only expected to work with a pure DRILLDOWN function without any additional formula functionality around it. If a user embeds the DRILLDOWN function into his own larger formula, then he will have to use the plain formula-editor to configure it.

...

Drill-Down profiles pointing to services provided by Pentaho will deliver a list of available parameter to the UI. The parameter-list will contain both the system-level parameter (for "local-prpt", for instance, the system parameter list will contain all defined parameter of the reporting plugin) along with the user-defined parameter.

...

Parameter-Names and Parameter-Values can either be static (hardcodedhard coded) values or values computed at runtime (any formula term, function or field-reference will work).

If the editor encounters an undefined profile, it has to default to a generic editor, so that the user can edit or correct the definition. (I do expect to see many undefined profiles in reports sent to support, as we are generally not in possession of the user's drill-down profile definitions.)

Drilling into a new Window

 use the following javascript URL:

Code Block

 javascript:top.reportViewer_openUrlInDialog('title', 'http://www.pentaho.com/','800px', '600px')

 
This only works if the report is run in the platform.

Drilling into a new Tab

To open a report in a new tab within the platform use the following formula function:

Code Block

=OPENINMANTLETAB([url]; [tab-text])

This creates the following javascript-url:

Code Block

javascript:top.mantle_openTab('<contents of tab-text>', '<contents of tab-text>', '<contents of url reference>')