2

There is a concern within my organization with regard to having business logic embedded within jasper reports for performing certain calculations. Obviously in order to create reports you need to utilize expressions and variables. Is there a good method for sharing these expressions/variables among different developers by say defining them within an external class that can then be accessed by everyone. Comes down to having the expression defined in a singular place that everyone can then pull into their reports when needed rather then having the same expression living within multiple reports as that could lead to inconsistencies in the way it's being calculated due to human error, etc.....Just looking for feedback on how folks may be accomplishing this within their own organizations.

Thanks, Bob

user1043036
  • 83
  • 1
  • 5

1 Answers1

0

Yes. You can create a custom 'scriptlet'. Here is an example

You would then set this scriptlet as the report scriptlet in the report properties.

Other alternatives might be to use stored procedures / functions.

Ben English
  • 3,900
  • 2
  • 22
  • 32