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

Put text not repeatable in horizontal detail


Joe Taras
Go to solution Solved by Joe Taras,

Recommended Posts

I want to put a static text not repeatable in horizontal band detail of my report written with iReport.


I've created my band in this way:


  • Print Order: Horizontal
  • Columns no.: 10

But I want an effect like this:


http://i.stack.imgur.com/Evak3.png


But the only effect proposed is: repeating of header name and age together the value.


How can I resolve this?


I used iReport 5.1.0


Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Because in my subreport I've these informations (name and age) exploding in horizontal way but in vertical order (as my upper image). So to understand to my users GIUSEPPE, MARIA, ERASMO are NAME i want to apply a text field at the begin of row (idem about AGE field)<<<<<< This comment was blocked and unpublished because Project Honeypot indicates it came from a suspicious IP address.
Link to comment
Share on other sites

  • Solution

Solved!


I want to share my solution step by step:


  1. I've created a band detail to explode in horizontal way and I've set number of column (10)
  2. I've added a text field "Name"
  3. I've set the following XML properties on "Name" text field:
    • isPrintRepeatedValues = false
    • printWhenGroupChanges = "name of group container"


  4. I've put field $F{Name} in the same column of text field "Name"

The result has been:


All value of name field are repeated and the text field has shown only once.


Have a nice day ;)


Link to comment
Share on other sites

  • 1 year later...

You can actually do this in the UI. "print repeated values" unticked and then print when expression "($V{REPORT_COUNT})<2". This way you can use it without a group. This can also be done with lines if you're creating a grid. Handy when using sub reports to show first the data horizontally and then the trend with a chart

 

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