This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Jasper Reports Cookbook - One More Question

 
Ranch Hand
Posts: 213
  • 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
 
Author
Posts: 17
  • 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: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks again Bilal, I will check and post my comments.
 
You get good luck from rubbing the belly of a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!