File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jasper Reports Cookbook - One More Question

 
Varun Chopra
Ranch Hand
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bilal

I have one more question.
In one of the projects for which we are thinking of using Jasper Reports, problem is number of report fields can vary.
This is metadata driven and will be decided at runtime.
So question is same jasper report can dynamically increase/decrease number of columns in output report and if yes then is there some example of this in book?

regards
Varun
 
bilal sidiqui
Author
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Varun,

Thank you for your second question.

Dynamic runtime changes in the output report is a common requirement. JasperReports provides a “Print When Expression” property, which is very useful to fulfill dynamic requirements. I have covered the use of “Print When Expression” property in several recipes of the book.

For example, you can check the “Applying styles to your data based on a
logical or mathematical condition” recipe of a sample chapter named “Using Mathematical and Logical Expressions” available for free download from Packt’s Web site.

In this recipe I have used the “Print When Expression” property to show one of a pair of columns and hide the other. The show/hide decision depends on a mathematical condition. You can use this strategy in an almost infinite number of ways.

Please try the recipes of the free sample chapter and post your comments whether or not you like the way I have demonstrated how report designers can play with the “Print When Expression” property for dynamic report design.
 
Varun Chopra
Ranch Hand
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks again Bilal, I will check and post my comments.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic