Jump to content
Changes to the Jaspersoft community edition download ×

SubReport Disappear when value is NULL.


2004 IR Help

Recommended Posts

By: DevilFISH - marcelochong

SubReport Disappear when value is NULL.

2004-07-09 00:13

I have create 4 subreports in my main report.

 

Three of them are fine.

 

But one of them encounter some problem.

 

When the value which select from the database is empty....

 

the subreport doesn't appear.....

 

even the static text in the subreport cannot appear too.

 

Also, may i ask, how to set a default value for a Field?

 

For example, if my Field is trying to retreive how many clients in the database, if there has no client....the field just print out empty...

 

But i when to set it as "0", can someone give me some help? ^.^

 

thanks!

 

 

 

 

By: Bat(ch)man - dekit

RE: SubReport Disappear when value is NULL.

2004-07-11 02:37

Can it be that the subreport does not appear, because it receives a recodset containing no records at all?

 

I don't believe there is a thing like default value for fields, but you can always enter a expression like:

 

($F{MyField}!=null) ? $F{MyField} : new Double(0)

 

 

 

 

By: Jacky - jacky11287

RE: SubReport Disappear when value is NULL.

2004-07-11 05:47

I tried, but still is not OK~~~

 

Can I do something to control outside~~~??

 

Thanks

Jacky Chan

 

 

 

 

 

By: Bat(ch)man - dekit

RE: SubReport Disappear when value is NULL.

2004-07-11 07:25

What do you mean? What did you try, and outside what do you want something to do?

 

 

 

 

 

By: Jacky - jacky11287

RE: SubReport Disappear when value is NULL.

2004-07-11 19:15

I have tried to use your method~~~

 

And still doesn't work~~~~

 

And my meaning is that::

 

The report doesn't perform the filling stage~~~

 

May I do something in the JAVA code to control~~~???

 

Thanks,

Jacky Chan

 

 

 

 

By: Giulio Toffoli - gt78

RE: SubReport Disappear when value is NULL.

2004-07-12 01:37

 

You have to set the report property whenNoData to "allBandsNoDetail" in the report properties window (tab more).

 

Giulio

 

 

 

 

By: Rick Millar - rmillar

RE: SubReport Disappear when value is NULL.

2004-07-12 07:58

With regard to the static text not printing when your subreport contains no data, you can set the "when no data" field to "AllSectionsNoDetail" in the "more" tab on the "report properties" window of your subreport. By setting this value, the static text of your subreport will be printed even when your subreport query returns no rows.

 

 

 

 

 

 

By: supportsib - supportsib

RE: SubReport Disappear when value is NULL.

2004-07-13 00:58

My question is same but little bit different.I have no static text in the subreport.But i want to print the detail band even if the field value is null.And another problem related with the issue is,I want the subreport field value in my master report.I used theodord trick to get the subreport value in my master report.The problem is if the value is null it returns the previous value

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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