nEWbie
nEWbie

Reputation: 99

Conditional Hyperlink in JasperReports 5.0

I have created several drilldown reports within my report unit and one of them is based on number of transactions (drilldown for more detail).

I want the drilldown to only be available when the number of transactions is greater than or equal to one.

Can this currently be done?

Upvotes: 1

Views: 1861

Answers (3)

Amit
Amit

Reputation: 1

JasperSoft Reports 6.12.2 Place Text field stacked on top of one another. Add Print when Expression to display on condition. In Hyperlink Settings If do not want to display link then set Link Target : Self and Link Type : None Else Link Target : Blank and Link Type : Reference and use Hyperlink Expression as per your need.

Upvotes: 0

Meam
Meam

Reputation: 266

Make HyperlinkExpression return null. This works for me.

http://community.jaspersoft.com/questions/520247/conditionally-display-link

Upvotes: 0

Lisa
Lisa

Reputation: 1341

You could have two fields stacked on top of one another, one with the hyperlink and one without. Set your expression to show the field without the hyperlink when transactions < 1, and show the field with the hyperlink when transactions >= 1.

Upvotes: 1

Related Questions