Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48576

Re: set active page in report with JavaScript API.

$
0
0

Thanks .

 

I was able to resolve this and set the page dynamically.

 

Instead of fetching the page using page name as mentioned in my intial post, I got an array of all the pages and then set whichever page needs to be active.This worked.

 

My previous code:

const page = report.page(pageName);
page.setActive();

 

My current code:

var pages = [];

report.getPages().then(function (reportPages) {
pages = reportPages;
});

pages[1].setActive();

 

Hope this helps someone visiting here for the same issue.


Viewing all articles
Browse latest Browse all 48576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>