Jump to content
JasperReports Library 7.0 is now available ×

How to show the line when subreport has data only


krasbutch

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:

 

Code:

|
| ID NAME
| ----------------
|---> 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...