This video shows how to number the rows in a Jasper Reports crosstab. A custom Java class 'Counter' is used in a Text Expression. The expression retrieves the current value and increments the counter.
Developing a class in the Eclipse IDE for use in iReport Designer is also featured.
The code referenced in the video is available here. It's compiled using Java 6 into a JAR file here which is ready to use in iReport Designer 4.7.0.
Check out the custom Java-free version here: http://bekwam.blogspot.com/2012/09/the-improved-crosstab-counter-in.html.
ReplyDeleteI have did as in this video all went good but when i complied it
DeleteCompiling to file... /root/Desktop/ARTI/Stockupload.jasper
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. Crosstab bucket expression missing for group order. 2. Crosstab bucket value class missing for group order. at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:258) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:140) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:514) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
pls help me
Thanks u.....................
ReplyDeletepls give me idea how to sum row group field
Hi Carl,
ReplyDeleteI have did as in this video all went good. But I have a problem , these counter number is not resetting. please help me to solve this issue.
I need to reset counter for each and every hit.
Hi,
DeleteHow are you calling the report? Is it through a web app or through iReport?
Hi Carl,
DeleteI have also same problem i am calling it iReport Designer 5.0.0 so kindly tell me how to reset counter every time