Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Advanced Cube Grid sample is not coming in my local system

    Hi,

    Before going to explain my problem I have some questions:

    1) Do we need to setup any OLAP Server to get the data for Cube Grid.
    2) Is it mandatory to configure OLAP server to get the Advanced Cube Grid.
    3) How do we get the aggregated data, Whether we have to get it from the query as part of the data or It will calculate automatically.

    I am trying to develop Advanced Cube grid for my ERP system. Before going to develop my real scenario. I thought of replicating the sample ( Advanced Cube) which was provided in Feature explorer in my local. But I am unable to do that and while developing I am getting below java script errors.

    I am using the sample data for Advanced grid also ( Just like Basic Grid). So, I am not using Data Source.



    Please find my problems below:
    1)Object doesn't support this property or method --- My cursor is showing in isc.MultiGroupDialog.getProtoType() under ISC_Grid.js
    2) isc.portlet is null or not an object -- My cursor is showing in
    isc.A=isc.Portlet.getPrototype() under ISC_DataBinding.js

    Please find my code below:

    <%@ taglib uri="/WEB-INF/iscTaglib.tld" prefix="isomorphic" %>
    <%@ page contentType="text/html; charset=WINDOWS-1256" pageEncoding="WINDOWS-1256" %>
    <HTML>
    <HEAD>

    <STYLE>
    .headerText {font-family:Verdana,Helvetica,sans-serif; font-size:12px; font-weight:bold; color:black;}
    </STYLE><TITLE>
    SmartClient Multidimensional DataSource Demo

    <!--<isomorphic:loadISC skin="TreeFrog" /> -->


    </TITLE></HEAD><BODY>

    <SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_Drawing.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_Charts.js></SCRIPT>
    <SCRIPT SRC=../isomorphic/system/modules/ISC_Analytics.js></SCRIPT>



    <SCRIPT>

    var productRevenue_facets = [

    {
    id:"region",
    title:"region",
    isTree:true,
    values:[
    {id:"sum", title:"All Regions", collapse:false},
    {id:"Western U.S.", parentId:"sum", title:"Western U.S."},
    {id:"Midwest U.S.", parentId:"sum", title:"Midwest U.S"},
    {id:"Eastern U.S.", parentId:"sum", title:"Eastern U.S."}
    ]
    },

    {
    id:"quarter",
    title:"quarter",
    isTree:true,
    collapsed:true,
    width:150,
    values:[
    {id:"sum", title:"All Years", collapsed:false},
    {id:"2002", parentId:"sum", title:"2002", collapsed:false},
    {id:"2003", parentId:"sum", title:"2003", collapsed:false},
    {id:"Q1, 2002", parentId:"2002", title:"Q1, 2002"},
    {id:"Q1, 2003", parentId:"2003", title:"Q1, 2003", collapsed:false}

    ]
    },

    {
    id:"product",
    title:"product",
    isTree:true,
    collapsed:true,
    width:175,
    values:[
    {id:"sum", title:"All Products", collapsed:false},
    {id:"Pens", parentId:"sum", title:"Pens"},
    {id:"Chairs", parentId:"sum", title:"Chairs"},
    {id:"Monitors", parentId:"sum", title:"Monitors", collapsed:false}
    ]
    }
    ];


    var productData = [

    {quarter:"Q1, 2002", region:"Western U.S.", product:"Pens", _value:10000},
    {quarter:"Q1, 2002", region:"Western U.S.", product:"Chairs", _value:50000},
    {quarter:"Q1, 2002", region:"Western U.S.", product:"Monitors", _value:120000},

    {quarter:"Q1, 2002", region:"Midwest U.S.", product:"Pens", _value:8000},
    {quarter:"Q1, 2002", region:"Midwest U.S.", product:"Chairs", _value:22000},
    {quarter:"Q1, 2002", region:"Midwest U.S.", product:"Monitors", _value:20000, _hilite:"under10"},

    {quarter:"Q1, 2002", region:"Eastern U.S.", product:"Pens", _value:2000},
    {quarter:"Q1, 2002", region:"Eastern U.S.", product:"Chairs", _value:2000},
    {quarter:"Q1, 2002", region:"Eastern U.S.", product:"Monitors", _value:5000, _hilite:"under10"},

    {quarter:"Q1, 2003", region:"Western U.S.", product:"Pens", _value:10000},
    {quarter:"Q1, 2003", region:"Western U.S.", product:"Chairs", _value:50000},
    {quarter:"Q1, 2003", region:"Western U.S.", product:"Monitors", _value:120000},


    {quarter:"Q1, 2003", region:"Midwest U.S.", product:"Pens", _value:8000},
    {quarter:"Q1, 2003", region:"Midwest U.S.", product:"Chairs", _value:22000},
    {quarter:"Q1, 2003", region:"Midwest U.S.", product:"Monitors", _value:20000, _hilite:"under10"},

    {quarter:"Q1, 2003", region:"Eastern U.S.", product:"Pens", _value:22000, _hilite:"over50"},
    {quarter:"Q1, 2003", region:"Eastern U.S.", product:"Chairs", _value:40000},
    {quarter:"Q1, 2003", region:"Eastern U.S.", product:"Monitors", _value:105000}


    ];

    isc.CubeGrid.create({
    ID: "report",
    data: productData,
    width:"100%",
    height:"100%",
    // hideEmptyFacetValues:true,

    // formatCellValue:"isc.Format.toUSDollarString(value)",
    facets: productRevenue_facets,
    columnFacets:["quarter"],
    rowFacets:["region","product"],
    // hover tips
    canHover:true,
    cellHoverHTML:"if (record != null) return 'cell value: '+record.value+'<br>cell ID: '+record.cellID;",
    hoverProperties:{width:150, height:20},

    enableCharting: true,
    showFacetValueContextMenus: true,
    showFacetContextMenus: true,
    showCellContextMenus: true,
    valueTitle:"Sales",

    // misc settings for this application
    canCollapseFacets:true,
    canMinimizeFacets:true,
    autoSelectValues:"both", // both, cols, row, none
    rowHeaderGridMode:true,
    canMoveFacets:true

    });


    </SCRIPT>
    </BODY>
    </HTML>

    Please do the needful ASAP.

    #2
    Your script includes are out of order and incomplete, see the order in the QuickStart Guide and/or sample files.

    No, you don't need to set up an OLAP server. The sample in the SDK works with a plain SQL database, and the CubeGrid can be connected to any kind of data provider via its DataSource.

    Comment


      #3
      Not displaying any data in Cube Grid while using DataSource

      Hi,

      Thanks for the reply.

      I am able to see the Cube Grid with static data.Now I am trying to display the cube with dataSource. I am using metrics as two fields.

      Please find the below code:

      <%@ page contentType="text/html; charset=WINDOWS-1256" pageEncoding="WINDOWS-1256" %>
      <%@ taglib uri="/WEB-INF/iscTaglib.tld" prefix="isomorphic" %>
      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
      <HTML>
      <HEAD>

      <STYLE>
      .headerText {font-family:Verdana,Helvetica,sans-serif; font-size:12px; font-weight:bold; color:black;}
      </STYLE><TITLE>
      SmartClient Multidimensional DataSource Demo




      </TITLE></HEAD><BODY>

      <SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_Drawing.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_Charts.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/system/modules/ISC_Analytics.js></SCRIPT>
      <SCRIPT SRC=../isomorphic/skins/TreeFrog/load_skin.js></SCRIPT>




      <SCRIPT type='text/javascript'>

      var MOIDetails_facets = [

      {
      id:"AC0_ACCOUNT_MINISTRY_NUMBER",
      title:"Ministry Number",
      isTree:true,
      values:[
      {id:"sum", title:"All Ministry Numbers", collapsed:false},
      {id:"14027", parentId:"sum", title:"14027"}
      ]
      },

      {
      id:"AC0_ACCOUNT_NUMBER",
      title:"Account Number",
      isTree:true,
      collapsed:true,
      width:150,
      values:[
      {id:"sum", title:"All Account Numbers", collapsed:false},
      {id:"1000000", parentId:"sum", title:"1000000", collapsed:false},
      {id:"1100000", parentId:"sum", title:"1100000", collapsed:false},
      {id:"1101001", parentId:"sum", title:"1101001", collapsed:false}

      ]
      },

      {
      id:"metric",
      title:"Metric",
      isTree:true,
      collapsed:true,
      width:150,
      values:[
      //{id:"sum", title:"All Account Numbers", collapsed:false},
      {id:"AC0_FREE_BALANCE", title:"AC0_FREE_BALANCE"},
      {id:"AC0_APPROVED", title:" AC0_APPROVED"}

      ]

      },


      {
      id:"AC0_FISCAL_YEAR",
      title:"Fiscal Year",
      isTree:true,
      collapsed:true,
      width:175,
      values:[
      {id:"sum", title:"All Years", collapsed:false},
      {id:"2011", parentId:"sum", title:"2011"},
      {id:"2012", parentId:"sum", title:"2012"},
      {id:"2013", parentId:"sum", title:"2013"}
      ]
      }
      ];

      <isomorphic:loadDS ID="productRevenue"/>

      isc.CubeGrid.create({
      ID: "report",
      //data: productData,
      width:"100%",
      height:"100%",
      // hideEmptyFacetValues:true,

      // formatCellValue:"isc.Format.toUSDollarString(value)",
      facets: MOIDetails_facets,
      dataSource: "productRevenue",
      columnFacets:["AC0_FISCAL_YEAR","metric"],
      rowFacets:["AC0_ACCOUNT_MINISTRY_NUMBER","AC0_ACCOUNT_NUMBER"],

      valueProperty:"AC0_FREE_BALANCE",
      // hover tips
      canHover:true,
      cellHoverHTML:"if (record != null) return 'cell value: '+record.value+'<br>cell ID: '+record.cellID;",
      hoverProperties:{width:150, height:20},

      enableCharting: true,
      showFacetValueContextMenus: true,
      showFacetContextMenus: true,
      showCellContextMenus: true,
      valueTitle:"MOI",

      // misc settings for this application
      canCollapseFacets:true,
      canMinimizeFacets:true,
      autoSelectValues:"both", // both, cols, row, none
      rowHeaderGridMode:true,
      canMoveFacets:true
      });


      </SCRIPT>
      </BODY>
      </HTML>


      In which format I need to supply data from the query. Because If I am using the below ds my grid is not displaying anything.

      <?xml version="1.0" encoding="windows-1256"?>
      <DataSource
      ID="productRevenue"
      serverType="sql" tableName="EAD.TAC0_COA_MOI"
      dbName="EAD">

      <fields>
      <field name="cellID" type="sequence" hidden="true" primaryKey="true" />
      <field name="AC0_FISCAL_YEAR" type="text" title="Fiscal year" />
      <field name="AC0_ACCOUNT_MINISTRY_NUMBER" type="text" title="Ministry Number" />
      <field name="AC0_ACCOUNT_NUMBER" type="text" title="Account Number" />
      <field name="AC0_FREE_BALANCE" type="text" title="Value" />
      <field name="AC0_APPROVED" type="text" title="Value" />
      </fields>
      <operationBindings>
      <operationBinding operationType="fetch">
      <selectClause>
      ROWNUMBER() OVER() AS cellID, AC0_FISCAL_YEAR,
      AC0_ACCOUNT_MINISTRY_NUMBER , AC0_ACCOUNT_NUMBER , AC0_FREE_BALANCE, AC0_APPROVED
      </selectClause>
      <tableClause>
      EAD.TAC0_COA_MOI

      </tableClause>
      </operationBinding>
      </operationBindings>
      </DataSource>


      My Question is: If we have more than 1 metric then How can we supply valueField or data to all metrics like in my example I have 2 metrics (AC0_FREE_BALANCE, AC0_APPROVED)

      Please find the attached screen and the data returning from the query...
      Attached Files
      Last edited by bhaskarreddy.akepati; 20 May 2013, 01:12.

      Comment


        #4
        Declare the multiple metrics as a facet. You can either transform the data so there's one record per value, or use facet.inlinedValues.

        Comment


          #5
          How to get the Row facet values as Dynamic in Cube Grid

          Hi,

          Thanks for the above reply.

          I am able to display the data through data Source by creating the new table with the format of Cube Grid data.

          I still have some questions below:

          1) How can i get the facet values dynamically ( Example: In Image I need to get the Departments from the database. Currently hard coded)

          2) How can i display the row facet values based on the previous row facet. ( Example: In the Image I wanted to display the Departments whicha re applicable to the Account Numbers. But now all Departments are displaying for all Account Numbers)

          If you have, Please help me with examples for these things.


          Please find the below Code:


          <%@ page contentType="text/html; charset=WINDOWS-1256" pageEncoding="WINDOWS-1256" %>
          <%@ taglib uri="/WEB-INF/iscTaglib.tld" prefix="isomorphic" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <HTML>
          <HEAD>

          <STYLE>
          .headerText {font-family:Verdana,Helvetica,sans-serif; font-size:12px; font-weight:bold; color:black;}
          </STYLE><TITLE>
          SmartClient Multidimensional DataSource Demo




          </TITLE></HEAD><BODY>

          <SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_Drawing.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_Charts.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/system/modules/ISC_Analytics.js></SCRIPT>
          <SCRIPT SRC=../isomorphic/skins/TreeFrog/load_skin.js></SCRIPT>





          <SCRIPT type='text/javascript'>

          <isomorphic:loadDS ID="productRevenue"/>
          <isomorphic:loadDS ID="VAC2_COA_DEPARTMENT"/>

          var dynamicFacets =[
          {id:"SUM", title:"All Departments"}
          ];

          isc.DataSource.get("VAC2_COA_DEPARTMENT").fetchData(null,
          function (dsResponse, data) {
          // alert("data:"+data.length);
          for(var i=0;i<data.length;i++){
          alert("Dept ID: "+data[i].UNQ_AC2_DEPARTMENT_ID);
          var dept = {};


          dept.id = data[i].UNQ_AC2_DEPARTMENT_ID;
          dept.parentId = 'SUM';
          dept.title = data[i].UNQ_AC2_DEPARTMENT_ID;
          // dept.push({id: data[i].UNQ_AC2_DEPARTMENT_ID,parentId:'SUM',title:data[i].UNQ_AC2_DEPARTMENT_ID});
          // depts[i].id = data[i].UNQ_AC2_DEPARTMENT_ID;
          //alert("Dept ID latest: "+data[i].UNQ_AC2_DEPARTMENT_ID);
          //dept[parentId] = "SUM";
          //dept[title] = data[i].UNQ_AC2_DEPARTMENT_ID;
          dynamicFacets.push(dept);
          //alert("dynamicFacets: "+dynamicFacets +"dynamicFacets length: "+dynamicFacets.length );

          }
          for(var i=0;i<dynamicFacets.length;i++){

          //alert("id: "+ dynamicFacets[i].id+" parentId: "+dynamicFacets[i].parentId+" title: "+dynamicFacets[i].title);
          }

          }

          )



          var accountNumberFacets = [
          {id:"SUM ", title:"All Account Numbers"},
          {id:"1000000", parentId:"SUM ", title:"1000000"},
          {id:"1100000", parentId:"SUM ", title:"1100000"},
          {id:"1101001", parentId:"SUM ", title:"1101001"}

          ];

          var departmentFacets = [
          {id:"SUM", title:"All Departments"},
          {id:"037", parentId:"SUM",title:"037"},
          {id:"001", parentId:"SUM",title:"001"},
          {id:"002", parentId:"SUM",title:"002"}


          ];
          var MOIDetails_facets = [

          {
          id:"AC9_MINISTRY_NUMBER",
          title:"Ministry Number",
          isTree:true,
          values:[
          {id:"14027",title:"14027"}
          ]
          },

          {
          id:"AC9_ACCOUNT_NUMBER",
          title:"Account Number",
          isTree:true,
          collapsed:true,
          width:150,
          values:accountNumberFacets
          },

          {
          id:"AC9_METRIC",
          title:"Metric",
          isTree:true,
          collapsed:true,
          width:150,
          values:[
          {id:"AMOUNT_ESTIMATED ", title:"ESTIMATED"},
          {id:"AMOUNT_APPROVED ", title:"APPROVED"},
          {id:"EXTRA_APPROVED ", title:"EXTRA APPROVED"},
          {id:"TOTAL_FINANCIAL_COMMITMENT ", title:"TOTAL FINANCIAL COMMITMENT"},
          {id:"TOTAL_FINANCIAL_OBLIGATION ", title:"TOTAL FINANCIAL OBLIGATION"},
          {id:"NON_DISTRIBUTED ", title:"NON DISTRIBUTED"},
          {id:"PV_CREDIT_TOTAL ", title:"PV CREDIT TOTAL"},
          {id:"PV_DEBIT_TOTAL ", title:"PV DEBIT TOTAL"},
          {id:"PV_BALANCE ", title:"PV BALANCE"},
          {id:"PROGRAM_APPROVED ", title:"PROGRAM APPROVED"},
          {id:"NON_PROGRAM_APPROVED ", title:"NON PROGRAM APPROVED"},
          {id:"FREE_BALANCE ", title:"FREE BALANCE"}

          ]

          },


          {
          id:"AC9_FISCAL_YEAR",
          title:"Fiscal Year",
          isTree:true,
          collapsed:true,
          width:175,
          values:[
          {id:"2011", title:"2011"},
          {id:"2012", title:"2012"},
          {id:"2013", title:"2013"}
          ]
          },


          {
          id:"AC9_CHAPTER_ID",
          title:"Chapters",
          isTree:true,
          collapsed:true,
          width:175,
          values:
          [
          {id:"SUM ", title:"Total Expenses and Revenue"},
          {id:"Expenses", parentId:"SUM ",title:"Expenses"},
          {id:"Revenue", parentId:"SUM ",title:"Revenue"},
          {id:"EChapter1", parentId:"Expenses",title:"Chapter1"},
          {id:"EChapter2", parentId:"Expenses",title:"Chapter2"},
          {id:"EChapter3", parentId:"Expenses",title:"Chapter3"},
          {id:"EChapter4", parentId:"Expenses",title:"Chapter4"},
          {id:"RChapter1", parentId:"Revenue",title:"Chapter1"},
          {id:"RChapter2", parentId:"Revenue",title:"Chapter2"},
          {id:"RChapter3", parentId:"Revenue",title:"Chapter3"},
          {id:"RChapter4", parentId:"Revenue",title:"Chapter4"}
          ]
          },

          {
          id:"AC9_DEPARTMENT_ID",
          title:"Departments",
          isTree:true,
          collapsed:true,
          width:175,
          values:departmentFacets
          },

          {
          id:"AC9_PROGRAM",
          title:"Programs",
          isTree:true,
          collapsed:true,
          width:175,
          values:[
          {id:"SUM ", title:"All Programs and Non Program"},
          {id:"PROGRAMS ", parentId:"SUM ",title:"Programs"},
          {id:"NON-PROGRAM ", parentId:"SUM ",title:"Non-Program"},
          {id:"2013/1", parentId:"PROGRAMS ",title:"2013/1"}
          ]
          }
          ];

          /*
          for(var i=0;i<productRevenue.getFieldNames().size();i++){
          //alert("productRevenue.getFieldNames()[i]:"+productRevenue.getFieldNames()[i]);

          }*/




          isc.CubeGrid.create({
          ID: "report",

          width:"100%",
          height:"100%",
          // autoDraw:false,
          // hideEmptyFacetValues:true,

          // formatCellValue:"isc.Format.toUSDollarString(value)",
          facets: MOIDetails_facets,
          dataSource: "productRevenue",
          valueProperty:"AC9_VALUE",
          cellIdProperty: "AC9_CELL_ID",


          columnFacets:["AC9_FISCAL_YEAR","AC9_METRIC"],
          rowFacets:["AC9_MINISTRY_NUMBER","AC9_CHAPTER_ID","AC9_ACCOUNT_NUMBER","AC9_DEPARTMENT_ID","AC9_PROGRAM"],
          // hover tips
          canHover:true,
          cellHoverHTML:"if (record != null) return 'cell value: '+record.value+'<br>cell ID: '+record.cellID;",
          hoverProperties:{width:150, height:20},

          enableCharting: true,
          //showFacetValueContextMenus: true,
          // showFacetContextMenus: true,
          // showCellContextMenus: true,
          valueTitle:"MOI",

          // misc settings for this application
          canCollapseFacets:true,
          canMinimizeFacets:true,
          autoSelectValues:"both", // both, cols, row, none
          rowHeaderGridMode:true,
          canMoveFacets:true
          });


          </SCRIPT>
          </BODY>
          </HTML>
          Attached Files
          Last edited by bhaskarreddy.akepati; 22 May 2013, 06:16.

          Comment


            #6
            How to get Dynamic facets in Cube Grid---Please give a reply to the above question.

            Please reply to the above question

            Comment


              #7
              1. To make facets dynamic, retrieve the facet definitions from DataSources. It looks like you've already started on this path, but if you want an additional example, this wiki article shows this approach; note there's no need to have MDX or any similar OLAP server, any type of DataSource is fine.

              2. There are two ways:

              a. combine Account Numbers and Departments into a single tree facet

              b. use hideEmptyFacetValues to cause rows to be omitted for combinations of Account Numbers and Departments where there is no data.

              Note that b) has special rules related to load on demand (since we can only eliminate data if we know we've loaded all the data for the row), so a) is really the preferred approach.

              Comment

              Working...
              X