thisismark Posted October 22, 2012 Share Posted October 22, 2012 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 More sharing options...
marianol Posted October 22, 2012 Share Posted October 22, 2012 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 More sharing options...
thisismark Posted October 24, 2012 Author Share Posted October 24, 2012 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 More sharing options...
marianol Posted October 26, 2012 Share Posted October 26, 2012 The iReport doumentation (under /docs) talks about the variables. The ones you create and the pre-created ones like $V{groupname_COUNT}. I do have a simple report with groups that prints them out in different bands so I can see how they are incremented :) Link to comment Share on other sites More sharing options...
marianol Posted October 26, 2012 Share Posted October 26, 2012 The iReport doumentation (under /docs) talks about the variables. The ones you create and the pre-created ones like $V{groupname_COUNT}. I do have a simple report with groups that prints them out in different bands so I can see how they are incremented :) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now