We are tryping to use igpivotgrid with olap xmla data source and want to have expand and collapse functionality on button click.
For this, we are using below code
<input type="button" onclick="expand()" value="Expand" />
function expand() { var tuplesCount, membersCount; for (var x = 0; x < dataSource.result().axes().count() ; x++) { tuplesCount = dataSource.result().axes().item(x).tuples().count(); for (var i = 0; i < tuplesCount; i++) { membersCount = dataSource.result().axes().item(x).tuples().item(i).members().count(); for (var j = 0; j < membersCount; j++) { if (dataSource.result().axes().item(x).tuples().item(i).members().item(j).isExpandable()) { dataSource.expandTupleMember(dataSource.result().axes().item(x).name(), i, j); dataSource.update(); } } } } }
After adding a meaure and a dimension, on first "Expand" button click, it throws an error in browser console "TypeError: Cannot read property 'createAxis' of null(…)"
Hello Satish Ganai,
I have created a support case for you with an ID of CAS-177505-L2Z8L7. The matter has been determined to be a development issue and has been logged in our tracking system with ID: 226322.
I will leave this case open and update you with any new information. You can view the status of the development issue connected to this case by going to the “Account” tab on our website, selecting "My Support Activity" and then this support case will be listed there. Then, you may select the "Development Issues" tab to view details of this development issue.
Please let me know if you have any questions.
I am discussing this with my team for further assistance with this. I will update you again tomorrow.
Thank you for posting in our forums!
Using the code you provided, I am able to reproduce the error you are experiencing. I will need a little more time to research why this is occurring and provide a solution.
I will have more information or questions for you tomorrow.