Bu yazimizda Ireport uzerinde subreport kullanimini, bir rapor uzerine subreport`un nasil eklendigi uygulamali bi sekilde yapmaya calisacaz..
Ben NetBean uzerindeki daha onceden JavaDB (Derby) ile baglanti kurdugum source kullanacam..
Oncelikle bize gerekli olacak tablolari yaratma ile baslayalim, ve tablolar uzerindeki iliskileri belirtelim..
CREATE TABLE alumnos ( ID integer NOT NULL, NOMBRE varchar(100) NOT NULL, CLAVE varchar(100) NOT NULL, PRIMARY KEY (ID) )
Ikinci Tablomuz..
CREATE TABLE materias ( ID integer NOT NULL, NOMBRE VARCHAR(100) NOT NULL, PRIMARY KEY (ID) )
Tablolar arasinda iliskileri gosterdigimiz yardimci tablomuz
CREATE TABLE alumnos_materias ( ALUMNO_ID integer NOT NULL, MATERIA_ID integer NOT NULL, PRIMARY KEY (ALUMNO_ID, MATERIA_ID), FOREIGN KEY (ALUMNO_ID) REFERENCES alumnos (ID), FOREIGN KEY (MATERIA_ID) REFERENCES materias (ID)
)
Simdide, tablolarimiza veriler ekleyelim..
INSERT INTO alumnos VALUES (1, 'Alumno 1', '00001'); INSERT INTO alumnos VALUES (2, 'Alumno 2', '00002'); INSERT INTO alumnos VALUES (3, 'Alumno 3', '00003'); INSERT INTO alumnos VALUES (4, 'Alumno 4', '00004'); INSERT INTO alumnos VALUES (5, 'Alumno 5', '00005'); INSERT INTO alumnos VALUES (6, 'Alumno 6', '00006'); INSERT INTO alumnos VALUES (7, 'Alumno 7', '00007'); INSERT INTO alumnos VALUES (8, 'Alumno 8', '00008'); INSERT INTO alumnos VALUES (9, 'Alumno 9', '00009'); INSERT INTO alumnos VALUES (10, 'Alumno 10', '000010'); INSERT INTO materias VALUES (1, 'Matematicas'); INSERT INTO materias VALUES (2, 'Fisica'); INSERT INTO materias VALUES (3, 'Quimica'); INSERT INTO materias VALUES (4, 'Biologia'); INSERT INTO materias VALUES (5, 'Historia'); INSERT INTO materias VALUES (6, 'Geografia'); INSERT INTO alumnos_materias VALUES (1, 1); INSERT INTO alumnos_materias VALUES (1, 3); INSERT INTO alumnos_materias VALUES (1, 5); INSERT INTO alumnos_materias VALUES (2, 1); INSERT INTO alumnos_materias VALUES (2, 2); INSERT INTO alumnos_materias VALUES (2, 3); INSERT INTO alumnos_materias VALUES (3, 2); INSERT INTO alumnos_materias VALUES (3, 4); INSERT INTO alumnos_materias VALUES (3, 6); INSERT INTO alumnos_materias VALUES (4, 4); INSERT INTO alumnos_materias VALUES (4, 5); INSERT INTO alumnos_materias VALUES (4, 6); INSERT INTO alumnos_materias VALUES (5, 1); INSERT INTO alumnos_materias VALUES (5, 4); INSERT INTO alumnos_materias VALUES (5, 5); INSERT INTO alumnos_materias VALUES (6, 2); INSERT INTO alumnos_materias VALUES (6, 5); INSERT INTO alumnos_materias VALUES (6, 6); INSERT INTO alumnos_materias VALUES (7, 1); INSERT INTO alumnos_materias VALUES (7, 3); INSERT INTO alumnos_materias VALUES (7, 5); INSERT INTO alumnos_materias VALUES (8, 1); INSERT INTO alumnos_materias VALUES (8, 2); INSERT INTO alumnos_materias VALUES (8, 3); INSERT INTO alumnos_materias VALUES (9, 2); INSERT INTO alumnos_materias VALUES (9, 4); INSERT INTO alumnos_materias VALUES (9, 6); INSERT INTO alumnos_materias VALUES (10, 4); INSERT INTO alumnos_materias VALUES (10, 5); INSERT INTO alumnos_materias VALUES (10, 6);
Hiya! I know this is kinda off topic but I'd figured I'd ask.
YanıtlaSilWould you be interested in exchanging links or maybe guest writing a blog post or vice-versa?
My website addresses a lot of the same topics as yours and I feel we could greatly benefit from each
other. If you happen to be interested feel free to send me an email.
I look forward to hearing from you! Superb blog by the way!
Here is my webpage; football kit algeria
My webpage :: football jersey shadow box
This article offers clear idea in support of the new users of blogging, that really how
YanıtlaSilto do blogging and site-building.
my web page ... 888 jersey shop
My web site - football kit rumors