When you develop web report with RAQ Report, if it confronts with mass data list, then the problems like operational speed slow down, memory overflow, system halted may appear while reading, displaying and exporting reports.
So RAQ Report provides the extHtml tag for page calculation. This tag has extended the function of the original html tag, implemented reading, displaying and exporting in pages, decreased memory demand, improved operational efficiency and avoided the memory overflow problem.
Then, how to display current page and total pages in the cell using the Page tag?
There are two methods to finish this work:
1. Suppose the default cache page number of the Page tag is 100, assign the property in the Page tag with 1: cachePageNum=“1”, then use the expression =beginRow/10+1 in the cell to display current page number, use =totalCount/20 to display total pages. If the value of cachePageNum is not changed to 1, it will always display 1 as current page number, for report will consider it has cached 100 pages, when you click Next, although calculation is proceeded in the background, the value of beginRow won’t change anymore.
2. We can set the data type of a cell in the report as html, and input the following js code in corresponding content:
<script>
document.write(report1_getCurrPage());
</script>
At this time, when we click Next, the displayed number is the current page number.
For total pages, we can you the expression: =floor(query(‘SELECT count(*) FROM OrderDetail’)/20,0)+1
Bookmarks