Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a hypercube in qMode="p" for pivot data and want to use the GetHyperCubePivotData(qPath, qPages) function but I'm lost on what to use for the values in the qPages parameter.
Are there any examples of how to fetch additional hypercube pages for pivot data?
The retrieval of data for pivot cubes is pretty much the same as for regular cubes. The difference is that the number of rows and columns depends not only on the selection state, but also on the pivot cube configuration. That's why the method "GetHyperCubePivotData" returns the extra information "qLeft" and "qTop". These properties contains the values of the left column and the top column for the area covered by the page you have retrieved.
But apart from this, there is no real difference from regular hypercubes when it comes to pagination. In fact, you can if you like, use the regular "GetHyperCubeData" also for cubes of pivot type, but then you won't get that "qLeft" and "qTop" information. The total size of the cube can always be found in the property "qSize" of the cube layout. That property contains the two properties "qcx" and "qcy" which states the total number of columns and rows in the table. So if you retrieve a page of say size top=0, left=0, width=qcx and height=y, then there is more data to get if y<=qcy. Then the natural next page to get would be to add "y" to "top" and get the page top=y, left=0, width=qcx, height=y. More data after that? Well, if 2*y >= qcy, then you get the next page. And so on...
Those pivot cubes are certainly somewhat more complicated than regular cubes. But there are actually some examples on how to get data from them in the references documentation:
In particular this page:
Is it something like this you are looking for?
I was hoping for something in Javascript that shows how to request additional pages until you have the full dataset.
For example, what should the values of qHeight,qWidth,qTop and qLeft be for subsequent requests to the GetHyperCubePivotData function? and how do I know how many pages I need to request to have everything?
The example you posted seems to only show what happens with the first request but not how to get additional pages.
The retrieval of data for pivot cubes is pretty much the same as for regular cubes. The difference is that the number of rows and columns depends not only on the selection state, but also on the pivot cube configuration. That's why the method "GetHyperCubePivotData" returns the extra information "qLeft" and "qTop". These properties contains the values of the left column and the top column for the area covered by the page you have retrieved.
But apart from this, there is no real difference from regular hypercubes when it comes to pagination. In fact, you can if you like, use the regular "GetHyperCubeData" also for cubes of pivot type, but then you won't get that "qLeft" and "qTop" information. The total size of the cube can always be found in the property "qSize" of the cube layout. That property contains the two properties "qcx" and "qcy" which states the total number of columns and rows in the table. So if you retrieve a page of say size top=0, left=0, width=qcx and height=y, then there is more data to get if y<=qcy. Then the natural next page to get would be to add "y" to "top" and get the page top=y, left=0, width=qcx, height=y. More data after that? Well, if 2*y >= qcy, then you get the next page. And so on...