Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: JPivot Xaction issue

  1. #1

    Default JPivot Xaction issue

    I'm running CDF 2.1-RC1 and Pentaho 2.0

    I've got a bar chart that I create using an xaction and I pass to that xaction a couple of variables. What I want to do when I click on the bar chart is call a JPivot xaction with those variables as parameters to the JPivot xaction. Here is my bar chart xml code

    Code:
    <chart-attributes> 
      <chart-type>BarChart</chart-type>  
      <orientation>horizontal</orientation>  
      <color-palette> 
        <color>#336699</color>  
        <color>#99CCFF</color>  
        <color>#999933</color>  
        <color>#666699</color>  
        <color>#CC9933</color>  
        <color>#006666</color>  
        <color>#3399FF</color>  
        <color>#993300</color>  
        <color>#CCCC99</color>  
        <color>#666666</color>  
        <color>#FFCC66</color>  
        <color>#6699CC</color>  
        <color>#663366</color> 
      </color-palette>  
      <chart-background type="color">#FFFFFF</chart-background>  
      <plot-background type="color">#EEEEEE</plot-background>  
      <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction&MDX_TIME=.[out_mdxtime]&MDX_COMPANY=.[out_mdxcompany]&mode=execute]]></url-template>  
      <url-target>_blank</url-target>  
      <use-base-url>false</use-base-url>  
      <series-name>department</series-name>  
      <title-font> 
        <font-family>Arial</font-family>  
        <size>12</size>  
        <is-bold>true</is-bold>  
        <is-italic>false</is-italic> 
      </title-font> 
    </chart-attributes>
    <width><![CDATA[450]]></width>
    <height><![CDATA[300]]></height>
    <title><![CDATA[Top 5 Salesperson by Sales]]></title>
    <by-row>true</by-row>
    out_mdxtime and out_mdxcompany are output variables I created from my input variables that I passed to the bar chart xaction.

    Anyway, what's happening when I run this is I get a window that says, Action Successful and it lists some of the properties of the JPivot xaction, but I never see a grid.

    Can someone tell me what I'm missing or if I'm even calling this correctly?

    Here is the URL from the window
    Code:
    http://pentaho.producepro.local:8080/pentaho/ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction&MDX_TIME=.[out_mdxtime]&MDX_COMPANY=.[out_mdxcompany]&mode=execute
    I noticed that the variables I passed to MDX_TIME and MDX_COMPANY didn't resolve correctly either (out_mdxtime and out_mdxcompany should be actual values). Any ideas on this?


    Thanks
    Bob
    Last edited by BobN; 01-27-2009 at 07:56 PM.

  2. #2

    Default

    OK, I have since gotten my data to show up when I click on the bar chart and it calls the JPivot table. I am still having issues with the parameters that I'm passing from my bar chart
    xaction to the JPivot xaction.

    When I look at the URL in the JPivot window, what ever I put in for my parameters shows up as I coded it. The variables are not resolved to their values. Here are some of the
    different ways I've tried to code this (not all at the same time). Again, this is in my bar chart xaction in the Chart Attributes section.

    Code:
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME=.[out_mdxtime]&MDX_COMPANY=.[out_mdxcompany]]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME=.[{out_mdxtime}]&MDX_COMPANY=.[{out_mdxcompany}]]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME=.[{PREPARE:out_mdxtime}]&MDX_COMPANY=.[{PREPARE:out_mdxcompany}]]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME={out_mdxtime}&MDX_COMPANY={out_mdxcompany}]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME={PREPARE:out_mdxtime}&MDX_COMPANY={PREPARE:out_mdxcompany}]]></url-template>
    My URL for the JPivot window would then show....

    http://pentaho.producepro.local:8080...ion?MDX_TIME=.[out_mdxtime]&MDX_COMPANY=.[out_mdxcompany]

    or whatever I had placed as the values for the parameter.

    Can anyone tell me if I'm doing this correctly or not. If I'm not doing this correctly, can someone tell me the correct way to call the JPivot xaction with parameters from the bar chart xaction or point me to an example that does this.

    Thanks
    Bob

  3. #3
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    Quote Originally Posted by BobN View Post
    Code:
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME=.[out_mdxtime]&MDX_COMPANY=.[out_mdxcompany]]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME=.[{out_mdxtime}]&MDX_COMPANY=.[{out_mdxcompany}]]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME=.[{PREPARE:out_mdxtime}]&MDX_COMPANY=.[{PREPARE:out_mdxcompany}]]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME={out_mdxtime}&MDX_COMPANY={out_mdxcompany}]]></url-template>
    <url-template><![CDATA[ViewAction?solution=dashboards&path=sales_dashboard&action=top10SalespeopleJPivot.xaction?MDX_TIME={PREPARE:out_mdxtime}&MDX_COMPANY={PREPARE:out_mdxcompany}]]></url-template>
    Bob
    This is wrong. Check for examples, you need to use something like paramName and seriesName. You should find examples in the samples
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  4. #4

    Default

    After reading the wiki my understanding of paramName and series-Name is that these are values from the bar chart itself (certain measures or a column). I'm not looking to pass those values.
    I'm looking to pass values from the html file to the JPivot xaction but the flow of control goes to the bar chart xaction 1st. So if I'm undertanding what I read in the wiki, using these
    values (paramName and series-Name) will not help me. If I've misread or misunderstood what I read can I please get an explanation.

    Thanks

  5. #5
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    If you're using cdf 3.0 take a look at the pivotLink component.

    or try to encapsulate that in a javascript function (assuming you're talking about dashboards) and do the redirect in that javascript function
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.