cld71 Posted November 17, 2012 Share Posted November 17, 2012 I am tying to create a report that has section that don't repeat using iReports.Each section of the report I am putting in a new Detail Band, but when creating the report they keep repeating.How do I stop the Detail Bands repeating going on in iReports? Link to comment Share on other sites More sharing options...
rubamushtaq Posted November 18, 2012 Share Posted November 18, 2012 If you do not want to keep repeating the details you need to delete the detail band and just create your own detail with static text and fields or according to your requirement under the 'section' you are creating. Link to comment Share on other sites More sharing options...
cld71 Posted November 19, 2012 Author Share Posted November 19, 2012 Having trouble understand exactly what you mean.For example using the sample database that shows up in Netbeans with the Apache Derby connection my test iReport looks like this: I want the CUSTOMER_CUSTOMER_ID, and CUSTOMER_NAME listed all the way in one section. And the CUSTOMER_CUSTOMER_ID, and CUSTOMER_EMAIL listed all the way in another section. The output should look like this:CUSTOMER_ID NAME1 JumboCom2 Livermore Enterprises3 Nano Apple25 Oak Computers36 HostProCom106 CentralComp149 Golden Valley Computers409 New Media Productions410 Yankee Computer Repair722 Big Car Parts753 Ford Motor Co777 West Valley Inc.863 Top Network SystemsCUSTOMER_ID EMAIL1 jumbocom@gmail.com2 www.tsoftt.com3 www.nanoapple.net25 www.oakc.com36 www.hostprocom.net106 www.centralcomp.com149 www.gvc.net409 www.nymedia.com410 www.nycomp@repair.com722 www.sparts.com753 www.parts@ford.com777 www.westv.com863 www.hpsys.net Here is the Create table without the data that isn't needed:CREATE TABLE "APP"."CUSTOMER"( CUSTOMER_ID int PRIMARY KEY NOT NULL, NAME varchar(30), EMAIL varchar(40), CREDIT_LIMIT int); Here is the Inserts into the database:INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (1,'JumboCom','jumbocom@gmail.com',100000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (2,'Livermore Enterprises','www.tsoftt.com',50000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (3,'Nano Apple','www.nanoapple.net',90000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (25,'Oak Computers','www.oakc.com',25000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (36,'HostProCom','www.hostprocom.net',65000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (106,'CentralComp','www.centralcomp.com',26500);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (149,'Golden Valley Computers','www.gvc.net',70000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (409,'New Media Productions','www.nymedia.com',10000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (410,'Yankee Computer Repair','www.nycomp@repair.com',25000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (722,'Big Car Parts','www.sparts.com',50000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (753,'Ford Motor Co','www.parts@ford.com',5000000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (777,'West Valley Inc.','www.westv.com',100000);INSERT INTO "APP"."CUSTOMER"(CUSTOMER_ID,EMAIL,CREDIT_LIMIT) VALUES (863,'Top Network Systems','www.hpsys.net',25000); Link to comment Share on other sites More sharing options...
szaharia Posted November 22, 2012 Share Posted November 22, 2012 Hi,Try to use subreports to separate your data: one subreport containing only the Customer ID - Name section, the other containing the Customer ID - Email section. Place the two subreports in the detail band, choosing appropriate connection parameters for your reports. Something quite similar can be found in the subreport JR sample.Regards,sanda 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