MDX_report.xaction 2.95 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence> 
  <name>MDX_report.xaction</name>
  <title>%title</title>
  <version>1</version>
  <logging-level>debug</logging-level>
  <documentation> 
    <author>William Seyler</author>  
    <description>%description</description>  
    <help/>  
    <result-type>rule</result-type>  
    <icon>MDX_report.png</icon> 
  </documentation>

  <inputs> 
    <output-type type="string"> 
      <default-value>html</default-value>  
      <sources> 
        <request>type</request> 
      </sources> 
    </output-type> 
  </inputs>

  <outputs> 
    <report type="content">
      <destinations>
        <response>content</response>
      </destinations>
    </report>
  </outputs>

  <resources> 
    <catalog> 
      <!-- solution-file>
				<location>SampleData.xml</location>
				<mime-type>text/xml</mime-type>
			</solution-file -->  
      <url> 
        <location>samples/reporting/SampleData.mondrian.xml</location>  
        <mime-type>text/xml</mime-type> 
      </url> 
    </catalog>  
    <report-definition> 
      <solution-file> 
        <location>JFreeMondrianQuadrant.xml</location>  
        <mime-type>text/xml</mime-type> 
      </solution-file> 
    </report-definition> 
  </resources>
  
  <actions> 
    <action-definition> 
      <component-name>MDXLookupRule</component-name>
      <action-type>OLAP Query For Report Data</action-type>
      <action-resources> 
        <catalog type="resource"/> 
      </action-resources>
      <action-outputs> 
        <query-results type="result-set" mapping="reportData"/> 
      </action-outputs>
      <component-definition> 
        <jndi>SampleData</jndi>  
        <location>mondrian</location>  
        <query><![CDATA[with member [Measures].[Variance Percent] as '([Measures].[Variance] / [Measures].[Budget])', format_string = IIf(((([Measures].[Variance] / [Measures].[Budget]) * 100.0) > 2.0), "|#.00%|style='green'", IIf(((([Measures].[Variance] / [Measures].[Budget]) * 100.0) < 0.0), "|#.00%|style='red'", "#.00%"))
select Crossjoin({[Region].[All Regions].[Central], [Region].[All Regions].[Eastern], [Region].[All Regions].[Southern], [Region].[All Regions].[Western]}, {[Measures].[Actual], [Measures].[Budget]}) ON columns,
  Hierarchize(Union({[Department].[All Departments]}, [Department].[All Departments].Children)) ON rows
from [Quadrant Analysis]]]></query> 
      </component-definition> 
    </action-definition>
  
    <action-definition> 
      <component-name>JFreeReportComponent</component-name>
      <action-type>Pentaho Report</action-type>
      <action-inputs> 
        <data type="result-set" mapping="reportData"/>  
        <output-type type="string"/> 
      </action-inputs>
      <action-resources> 
        <report-definition type="resource"/> 
      </action-resources>
      <action-outputs>
        <report-output type="content" mapping="report"/>
      </action-outputs>
      <component-definition/> 
    </action-definition>
 
  </actions> 
</action-sequence>