I want to get the page number as Page X of Y where X is the current page number and Y is the total number of page count. I am getting pagenumber by <pageNumber/> tag but <pageCount/> is not rendering its value. Please acknowledge with solution.
Only way to use pagecount is to put pagecount part in the beginning of your rml file.. Example:
<template pageSize="(842.0,595.0)" title="Report Title here" author="Anankin Skywalker" allowSplitting="20">
<frame id="first" x1="0.0" y1="16.0" width="842" height="525"/>
<drawString x="23.87cm" y="19.9cm">Page: <pageNumber/>/ of <pageCount/></drawString>
You need to do it like this because pageNumber is rendered for each page as the page is rendered, but pageCount is actualy rendered after all pages are rendered because there is no way the program can know how much pages will it take for report... so the actual pageCount value is the last thing that is written to rendered pdf file...
hope this will be of help
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 7/21/14, 5:11 AM|
|Seen: 737 times|
|Last updated: 3/16/15, 8:10 AM|