Pagination in table and report ?

Hi ,

Can you Please share reference link for following thing
1.Can I set pagination in table and report
2.How to set report table with border for each cells(I found separate line for each row but not the border for each cells)

1 Like

Welcome @shahin.felkees,

Tables and Reports are not paged in Dundas BI as we have instead gone with the concept of scrolling to show content. If you want, it’s still possible to setup a table to be paginated.

Here is a sample that i built.
https://microsite.dundas.com/redirect.html?dashboard=147ac280-6384-4c32-8aee-90efff4f627d

To do this, pass your data through a data cube so that you can calculate page numbers and use a filter to set the current page. You can see at the bottom of my sample that there is a next and prev button, these are simply updating the ‘page number’ filter on the dashboard.

I must ask, do you really want paging on your dashboards? It’s useful in some cases like in the case of automatic scrolling for wall mounted dashboard but it’s mostly an old concept that isn’t often used with online content. If you want it, i can post some sample code and steps for you but i truly am curious about your use case.

For the border use the properties -> Look -> Cell Style


*Also make sure you don’t have an alternating row style set that is overriding your design

AND

Properties -> Look - > OUTER BORDER STYLE

1 Like

Hi Jeff,

This looks interesting, can you also share the code used for this paging concept.
We have a case wherein a client dashboard has multiple columns (15) and a couple of thousand rows, and we are experiencing performance issues, we want to try if paging display will make the dashboard loads faster for the user.
Thanks!

Hi @shai.palic.ad,

Here’s how I did it.

First, prep the data so that you have specific pages built into the dataset.

image

To do this, I created a Data Cube and add a calculated element to automatically break the data into pages.

Result:

Then just use it on a dashboard and hook up a parameter to select the page. The only code I have on the dashboard is for a forward and back button to choose the page in the filter parameter.

Prev Button:

var page = parseInt(window.dundas.context.baseViewService.currentView.control.viewParameters[1].parameterValue.values[0].uniqueName.split("."))-1;

if (page == -1)
{
page = 0;
}

// Set parameter value
var newValue = page;
var newUniqueName = newValue + ‘.Page’;
var parameters = window.dundas.context.baseViewService.currentView.control.viewParameters;

// get first view parameter
var param = parameters[1];
param.parameterValue.token = null;
param.parameterValue.values = [];
param.parameterValue.values.push(new dundas.data.MemberValue({hierarchyUniqueName: ‘Page’, levelUniqueName: ‘Page’, uniqueName : newUniqueName}));
param.loadAffectedAdaptersData();

//update label
pageLabel.labelText = page.toString();

Next Button:

var page = parseInt(window.dundas.context.baseViewService.currentView.control.viewParameters[1].parameterValue.values[0].uniqueName.split("."))+1;

if (page >= parseInt(pageMax.control.processedText))
{
page = parseInt(pageMax.control.processedText);
}

// Set parameter value
var newValue = page;
var newUniqueName = newValue + ‘.Page’;
var parameters = window.dundas.context.baseViewService.currentView.control.viewParameters;

// get first view parameter
var param = parameters[1];
param.parameterValue.token = null;
param.parameterValue.values = [];
param.parameterValue.values.push(new dundas.data.MemberValue({hierarchyUniqueName: ‘Page’, levelUniqueName: ‘Page’, uniqueName : newUniqueName}));
param.loadAffectedAdaptersData();

//update label
pageLabel.labelText = page.toString();

5 Likes

Nice workaround Jeff!

Glad you like it @luis.silva!!!

If I apply filters on the data, then the pagination breaks; some pages will have 2 results- others will have 6, etc.

Instead, using a counter column would help:

Unfortunately, I think this can only be added to a source node- not a transform node.
This means if you join this data, aggregate it, etc- then this still does not fix the issue.

Is there a way to get the row number after everything has been done to the data?
For example, can a transform node add it? Or is there a special variable that can be used in the Calculated element node? Or, can you nest the data cube in another data cube which would then add it somehow?

Hi @josh.1,

Try using the Rank transform in conjunction with the Sort transform.

You can see in my case, I was able to add this index.

2 Likes

here are my settings

Rank:


and

Sort:

2 Likes

@jeff Very cool! Thank you. :slight_smile: