Jump to content
We've recently updated our Privacy Statement, available here ×

How to hide rows with no data?


2006 IR Open Discussion

Recommended Posts

By: ka4sri_1999 - ka4sri_1999

How to hide rows with no data?

2006-04-20 21:36

Hi,

 

I am using iReport 1.2.0. My doubt is when I retrive rows from the datasource(XML datasource) and print it in the detail band as a table, I would like to know how to hide the rows with no data in it. Currently, empty cells are getting displayed but I want to remove the rows with no data.

Please help.

 

Thanks & Regards

Subashree

 

 

By: Kraemer - felipe_kraemer

RE: How to hide rows with no data?

2006-04-21 10:54

Hello,

 

I'm not sure I can help you, but I'll try.

 

If the current row has no data, probably the fields have null values. If this is your case, you can put the following code in the "Print When Expression" field on the "Detail" band properties:

 

$F{field_name} == null ? new Boolean(false) : new Boolean(true)

 

It means that if the "field_name" field of your detail band is null, iReport will hide the row.

 

I hope that will help you, friend!

 

Felipe Kraemer

 

 

By: ka4sri_1999 - ka4sri_1999

RE: How to hide rows with no data?

2006-04-23 20:04

That worked!Thank you so much Felipe. I needed that functionality urgently. Once again thanks.

 

Regards

Subashree

Link to comment
Share on other sites

  • 2 years later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi

       The row is being hide but leaving blank space but i want to save space too.

i.e when there is no value then hide the row and there should no space between the rows.

next value containing row should come in the place of the hide row..

if anyone find that solution please let me know.

Thanks and Regards,

Prasad

Link to comment
Share on other sites

Prasad,

 

In the email that you replied to, the solution hides the band. There will be no additional space between rows. It will do what you have described that you want. Please start a new thread with a detailed example of the problem that you're encountering.

 

Regards,

Matt

Jaspersoft

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