sarunsundar Posted August 15, 2014 Share Posted August 15, 2014 could add the built-in variable '$V{REPORT_COUNT}' to 'Page Footer' in JasperSoft Studio 5.6 community edition,also have set 'Evaluation TIme' property value to 'report'.however the value in preview of studio,and report in sever is zero,could you plz guide?Thank you,arun Link to comment Share on other sites More sharing options...
ghudson_1 Posted August 15, 2014 Share Posted August 15, 2014 Hi, You typed 'report', but you actually meant 'Report', right? In a simple test does it work? For example, open the FirstJasper.jrxml that comes with the samples, then tweak the footer, set Studio to use the Sample DB, like: <textField evaluationTime="Report"> <reportElement x="55" y="5" width="45" height="20" uuid="5a4a44aa-20b2-4898-9b36-549112da17cc"/> <textElement textAlignment="Right"> <font size="14"/> </textElement> <textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression> </textField> It works well in my sample, using JR 5.6. Default evaluation time is "Now" so without an evaluationTime specified I get the total number of records processed for each page. But if I set evaluationTime="Report", like the snippet above, I get the entire final record count (which is calculated at the very of end of the report) printed in the footer of each page. Are you printing $V{REPORT_COUNT} or actually using it for assignment with other variables? During runtime, since evaluationTime is "Report" instead of now, while filling the report template the value is ctually a placeholder value of "null" (i think... ) and the placeholder is obviously set to the final value once the whole resultset has been iterated over. Link to comment Share on other sites More sharing options...
sarunsundar Posted August 16, 2014 Author Share Posted August 16, 2014 the variable '[$V{REPORT_COUNT}]]' is used in 'Page Footer' ,however table is generated in the 'Summary' band,would that be an issue as table is not embedded in 'Detail' band?code snippet:<pageFooter><band height="30"><textField evaluationTime="Report"><textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression></textField> </band></pageFooter> Thank you,Arun Link to comment Share on other sites More sharing options...
sarunsundar Posted September 1, 2014 Author Share Posted September 1, 2014 resolved:$V{REPORT_COUNT}] gives total records of report when used inside Table Footer band Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now