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

iReport "pseudo-merge" Group Header and Detail


thisismark

Recommended Posts

Hi there!

I have created an SQL query which shows the following records:

Bus Number Date Order Code Parts
1111 10/01/2012 1234 Front Left Wheel
1111 10/01/2012 1235 Rear Left Wheel
1112 10/01/2012 1236 Left Wiper
1112 10/01/2012 1237 Right Wiper
1112 10/02/2012 1238 Windshield

 Now, I want to show them in iReports this way:

 

Bus Number Date Order Code Parts
1111 10/01/2012 1234 Front Left Wheel
    1235 Rear Left Wheel
1112 10/01/2012 1236 Left Wiper
    1237 Right Wiper
1112 10/02/2012 1238 Windshield

 

 

I just want to make the BUS NUMBER and the DATE invisible after its first record. At first, I thought putting all of the fields in
the same group header and then putting again the fields ORDER CODE and PARTS in the details section would do but came out like the one below. 
I thought the cursor would move to the next record.

 

Bus Number Date Order Code Parts
1111 10/01/2012 1234 Front Left Wheel
    1234 Front Left Wheel
    1235 Rear Left Wheel
1112 10/01/2012 1236 Left Wiper
    1236 Left Wiper
    1237 Right Wiper
1112 10/01/2012 1238 Windshield

 

Any ideas guys? :)

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

You can use the "Print When" expression in the detail band to prevent the printing of the first row, that way you do not have that first duplicate row.

The expresion should be something like this "$V{GroupedField_COUNT} > 1" and has to be at the Detail band so the first item of each group is not printed twice.

Here is a sample done using the standard Foodmart sample database: http://sharesend.com/qzi76

 

Link to comment
Share on other sites

Hi! Thanks for the answer. Unfortunately, the report you provided doesn't retrieve records. I also checked the expression of the fields in your detail band and there was no "$V" stuff. Can you please provide a sample?
----

Never mind above. Saw it on the band properties. Thanks. And can you please provide me a link of where you learned the $V{Group_COUNT}? Thank you so much.

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