Jump to content
Changes to the Jaspersoft community edition download ×

How to show the line when subreport has data only


Recommended Posts

Hi everyone!



I've got a problem and can't find a solve in the forum messages.



I have a one subreport and an arrow drawn using lines in the main report in the same band as subreport placed (it is necessary). I need to draw this arrow when subreport has any data and don't draw it if subreport is empty.



I return to master report a variable R_COUNT that contains a count of subreport rows. And I want the line becomes visible when this variable is not null or greater then 0.



The problem is that drawing of an arrow happens _before_ the subreport ends its processing. So, an arrow never shows because the variable R_COUNT is null when the line is drawing.



Unfortunately, line object has no parameter "evaluation time" to set it to "band".



Let me know if there are any tricks exists.



Thanks a lot,

Rustam F. Baiburin


Post edited by: krasbutch, at: 2007/03/22 16:04

Post edited by: krasbutch, at: 2007/03/22 16:06

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for the answer!


Unfortunately, an arrow should be printed only once even if the subreport has a number of rows. Also, it should cross both title and detail bands of the subreport. But an object can't belong to several bands.


It should looks like this:



| ----------------
|---> 01 Rustam
02 Petr
03 Alena
.. .....
nn Somebody
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...