PDA

View Full Version : Drill Down to Pivot Table



wladtepes
12-19-2008, 03:06 PM
hola estoy haciendo una Drill Down to Pivot Table con una conexion a oracle pero no funciona nada de nada


este es el codigo del xaction del ejemplo



<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>

<name>cuboregargado.xaction</name>
<version>1</version>
<title>%title</title>
<documentation>
<author>Cube Designer</author>
<description>%description</description>
<help>This action-sequence was generated by the Cube Designer. To edit this action-sequence use the Pentaho Design Studio.</help>
<result-type>report</result-type>
<icon>slicedice.png</icon>
</documentation>


<inputs>

<AGRUPA_BI type="string-list">
<default-value/>
<sources>
<request>AGRUPA_BI</request>
</sources>
</AGRUPA_BI>



<NEGOCIO type="string-list">
<default-value/>
<sources>
<request>NEGOCIO</request>
</sources>
</NEGOCIO>


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

<outputs>
<model type="string"/>
<connection type="string"/>
<mdx type="string"/>
<options type="string"/>
<title type="string"/>
<url type="string">
<destinations>
<response>redirect</response>
</destinations>
</url>
</outputs>

<resources/>

<actions>
<action-definition>

<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>

<action-inputs>
<position type="string"/>
</action-inputs>


<action-outputs>

<agrupa_biSelects type="string"/>

<negocioSelects type="string"/>
</action-outputs>


<component-definition>

<script>
<![CDATA[function getSelects( baseStr, values ) {
rtnStr = baseStr;
if ( values == null ) {
// Do nothing and the baseStr will be returned
}
else if ( typeof( values ) == "string" ) {
rtnStr += values;
}
else {
rtnStr = baseStr;
if ( (values != null) && (values.length >= 1) ) {
rtnStr += values[0];
for ( i = 1; i < values.length; ++i ) {
rtnStr += ", " + baseStr + values[i];
}
}
}
java.lang.System.out.println( rtnStr );
return( rtnStr );
}

agrupa_biSelects = getSelects( "[BI_MES_DETALLE.AGRUPA_BI].[All bi_mes_detalle.agrupa_bi]", AGRUPA_BI );
negocioSelects = getSelects( "[BI_MES_DETALLE.NEGOCIO].[All bi_mes_detalle.negocio]", NEGOCIO );]]>

</script>
</component-definition>

</action-definition>
<action-definition>

<component-name>PivotViewComponent</component-name>

<action-inputs>
<mode type="string"/>
<agrupa_biSelects type="string"/>
<negocioSelects type="string"/>
</action-inputs>

<action-outputs>
<model type="string"/>
<connection type="string"/>
<mdx type="string"/>
<options type="list"/>
<title type="string"/>
<url type="string"/>
</action-outputs>



<component-definition>
<title>cuboregargado</title>
<viewer>Pivot</viewer>
<model>samples/analysis/cuboregargado.mondrian.xml</model>
<jndi>oracle</jndi>
<options>
<personal/>
<cube-nav/>
<mdx-edit/>
<sort-conf/>
<spacer/>
<level-style/>
<hide-spans/>
<properties/>
<non-empty/>
<swap-axes/>
<spacer/>
<drill-member/>
<drill-position/>
<drill-replace/>
<drill-thru/>
<spacer/>
<chart/>
<chart-conf/>
<spacer/>
<print-conf/>
<print-pdf/>
<spacer/>
<excel/>
</options>

<query><![CDATA[

select NON EMPTY {[Measures].[SUM of BI_MES_DETALLE.MONTO]} ON COLUMNS
,
NON EMPTY
Crossjoin({ {agrupa_biSelects} }, { {negocioSelects} } ) ON ROWS


from [cuboregargado]]]></query>


</component-definition>

<action-name>Pivot View</action-name>
<logging-level>DEBUG</logging-level>



</action-definition>
</actions>
</action-sequence>




y este es el codigo del xml de definicion de mondrian




<?xml version="1.0" encoding="UTF-8"?>
<Schema name="cuboregargado">

<Dimension name="BI_MES_DETALLE.NEGOCIO">
<Hierarchy name="BI_MES_DETALLE.NEGOCIO" hasAll="true" allMemberName="All bi_mes_detalle.negocio">
<Table name="BI_MES_DETALLE"/>
<Level name="BI_MES_DETALLE.NEGOCIO" table="BI_MES_DETALLE" column="NEGOCIO" uniqueMembers="false"/>
</Hierarchy>
</Dimension>

<Dimension name="BI_MES_DETALLE.AGRUPA_BI">
<Hierarchy name="BI_MES_DETALLE.AGRUPA_BI" hasAll="true" allMemberName="All bi_mes_detalle.agrupa_bi">
<Table name="BI_MES_DETALLE"/>
<Level name="BI_MES_DETALLE.AGRUPA_BI" table="BI_MES_DETALLE" column="AGRUPA_BI" uniqueMembers="false"/>
</Hierarchy>
</Dimension>

<Cube name="cuboregargado">
<Table name="BI_MES_DETALLE"/>

<DimensionUsage name="BI_MES_DETALLE.NEGOCIO" source="BI_MES_DETALLE.NEGOCIO" />
<DimensionUsage name="BI_MES_DETALLE.AGRUPA_BI" source="BI_MES_DETALLE.AGRUPA_BI" />

<Measure name="SUM of BI_MES_DETALLE.MONTO" column="MONTO" aggregator="sum" datatype="Numeric" formatString="#.##0,###"/>

</Cube>
</Schema>





y este es el error que me marca al ejecutar:(


[es_161] Error: RuntimeContext.ERROR_0012 - [es_33] ActionDefinition for JavascriptRule did not execute successfully (org.pentaho.core.runtime.RuntimeContext)[es_116] Debug: [es_21] Starting execute of samples/analysis/cuboregargado.xaction (org.pentaho.core.solution.SolutionEngine)
[es_116] Debug: [es_30] Getting runtime context and data (org.pentaho.core.solution.SolutionEngine)
[es_116] Debug: [es_33] Loading action sequence definition file (org.pentaho.core.solution.SolutionEngine)
[es_116] Debug: SolutionRepository.DEBUG_FILE_PATH - [es_35] getFile path=C:\pentaho\bi-server\pentaho-solutions\samples\analysis\cuboregargado.xaction (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_23] Adding variable source request to parameter AGRUPA_BI (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_17] Adding default value of "[]" to parameter AGRUPA_BI (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_23] Adding variable source request to parameter NEGOCIO (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_17] Adding default value of "[]" to parameter NEGOCIO (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_23] Adding variable source request to parameter mode (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_17] Adding default value of "" to parameter mode (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_23] Adding variable source response to parameter url (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_116] Debug: [es_34] audit: instanceId=c8f6e082-cdff-11dd-8b53-4df0fc0f07ba, objectId=org.pentaho.core.runtime.RuntimeContext, messageType=action_sequence_start (org.pentaho.core.runtime.RuntimeContext)
[es_116] Debug: SolutionRepository.DEBUG_FILE_PATH - [es_35] getFile path=C:\pentaho\bi-server\pentaho-solutions (org.pentaho.repository.filebased.solution.SolutionRepository)
[es_14] Error: JSRULE.ERROR_0003 - [es_89] Javascript rule execution failed - org.mozilla.javascript.EcmaError: ReferenceError: "AGRUPA_BI" is not defined. (#23) (org.pentaho.plugin.javascript.JavascriptRule)
[es_161] Error: RuntimeContext.ERROR_0012 - [es_33] ActionDefinition for JavascriptRule did not execute successfully (org.pentaho.core.runtime.RuntimeContext)
[es_161] Error: SolutionEngine.ERROR_0007 - [es_27] Action sequence execution failed (org.pentaho.core.solution.SolutionEngine)

[es_41] Server Version Pentaho BI Platform 1.7.0.1062



quisiera saber cual es el problema o que me falta para que funcione

de antemano gracias por la ayuda :)