Hi,
in the dictionary of the report there are the system variables TotalPageCount and TotalPageCountThrough, there is a way to retrieve this varables in my javascript code after I called the render function?
I tried to access the report.totalPageCount and report.totalPageCount properties but they are always 0.
Thank you
Getting the total number of pages
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: Getting the total number of pages
Hello,
Please try to check the report.renderedPages.count property.
Thank you.
Please try to check the report.renderedPages.count property.
Thank you.
Re: Getting the total number of pages
Hi,
I tried with the following code but the value of the report.renderedPages.count property is always 0
Thanks
I tried with the following code but the value of the report.renderedPages.count property is always 0
Code: Select all
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.appearance.fullScreenMode = true;
options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Div;
options.appearance.chartRenderType = Stimulsoft.Viewer.StiChartRenderType.Vector;
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
viewer.report = report;
viewer.renderHtml("viewerContent");
console.log("COUNT PAGES ", report.renderedPages.count);
Re: Getting the total number of pages
Obviously the object "report" in the example is a valid report, it displays 3 pages
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: Getting the total number of pages
Hello,
You should call the render() method fo the report.
Thank you.
You should call the render() method fo the report.
Thank you.