Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
catalin
Partner - Contributor III
Partner - Contributor III

QlikSense .NET SDK - GetHyperCubePager - pageTransform:=Pager.Next error

Hello!

I am trying to iterate through a hypercube's pages and I am getting this error in VB. NET:

 

Argument not specified for parameter 'nxPages' of 'Public Shared Overloads Function [Next](nxPages As IEnumerable(Of NxPage)) As IEnumerable(Of NxPage)'.

 

 

The code used is ( courtesy of this blog post ):

 

Dim obj As Qlik.Sense.Client.Visualizations.Table = app.GetObject(Of Qlik.Sense.Client.Visualizations.Table)(objectid)                    
Dim qsPager = obj.GetHyperCubePager("/qHyperCubeDef")
Dim qsWidth = qsPager.NumberOfColumns
Dim qsHeight = qsPager.NumberOfRows
Dim maxHeight = CInt((10000 / qsWidth))
Dim pageHeight = Math.Min(qsHeight, maxHeight)
Dim rowsPerPage = New NxPage With {
                                    .Top = 0,
                                    .Left = 0,
                                     .Width = qsWidth,
                                     .Height = pageHeight
                                                        }
Dim DataPages As IEnumerable(Of IEnumerable(Of NxDataPage)) = qsPager.IteratePages({rowsPerPage}, pageTransform:=Pager.Next)

 

 

Anyone has any idea of what's going on? Any help or hint will be appreciated. Thanks a lot! 🙂

 

Catalin

2 Solutions

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

Hi! I don't know much about Visual Basic, but "Pager.Next" is a function. I'm not sure what the best way to pass functions as arguments is i in VB, but at least it seems to compile if you write like this:

Dim DataPages = qsPager.IteratePages({rowsPerPage}, pageTransform:=Function(p) Pager.Next(p))

 

View solution in original post

catalin
Partner - Contributor III
Partner - Contributor III
Author

3 Replies
catalin
Partner - Contributor III
Partner - Contributor III
Author

I was wondering, could it be because my object is Table type?

 

 Dim obj As Qlik.Sense.Client.Visualizations.Table = app.GetObject(Of Qlik.Sense.Client.Visualizations.Table)(objectid)
 Dim qsPager = obj.GetHyperCubePager("/qHyperCubeDef")

 

The parameter for Pager.Next, according to the docs, is a collection of NxPages. But isn't the collection defined at this point:

 

Dim DataPages As IEnumerable(Of IEnumerable(Of NxDataPage)) = qsPager.IteratePages({rowsPerPage}, Pager.Next)

 

Øystein_Kolsrud
Employee
Employee

Hi! I don't know much about Visual Basic, but "Pager.Next" is a function. I'm not sure what the best way to pass functions as arguments is i in VB, but at least it seems to compile if you write like this:

Dim DataPages = qsPager.IteratePages({rowsPerPage}, pageTransform:=Function(p) Pager.Next(p))

 

catalin
Partner - Contributor III
Partner - Contributor III
Author

Tks a lot!!