필터가없는 하위 보고서를 호출하는 깨끗한 Jasper 보고서가 있습니다. 해당 하위 보고서에서 모든 Json 데이터 (10 개 행)를 표시하고 미리보기를 보면 작동합니다 : Subreport preview.subDataSource()를 사용할 때 하위 보고서가 JsonDataSource에서 한 행만 가져 오는 이유는 무엇입니까?
문제는 주 보고서 (및 정리 된 보고서)에서 하위 보고서를 호출 할 때입니다. professionalName과 하위 보고서에만 세부 사항이 있습니다. 그것은 professionalName과 모든 subReport (매번 10 행)를 보여 주어야하지만, 그렇지 않습니다. 그것은 단지 현재 행을 보여 주며, 주 보고서가 하위 데이터에 모든 데이터 소스를 제공하지 않고 그 행만 제공하기 때문입니다. 캡처는 다음과 같습니다 : Main report preview.
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource()]]></dataSourceExpression>
및 JSON 파일이 하나입니다 :
데이터 원본 식입니다
[ {
"appointmentId": 153,
"startDate": 1503061200000,
"patientId": 417,
"patientIdentification": {
"id": 1,
"name": "85471254B"
},
"episodeId": 500358,
"chn": "500058",
"patientName": "Aida Mascaró",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "NEUROLOGIA",
"benefitId": 45,
"benefitName": "CONSULTA",
"schedule": {
"id": 30,
"name": "Neurologia"
},
"professionalName": "a",
"insurance": {
"id": 1387,
"name": "PRIVADOS"
},
"collective": {
"id": 26,
"name": "Privados"
},
"typeId": 1,
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {
"id": 3,
"name": "Accidente de trabajo"
},
"appoState": {
"id": 3,
"name": "Atendiendo"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503057809579
},
{
"appointmentId": 150,
"startDate": 1503039600000,
"patientId": 405,
"patientIdentification": {
"id": 1,
"name": "40295204D"
},
"episodeId": 500349,
"chn": "500046",
"patientName": "Cristina Mayo Saez",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "ENDOCRINOLOGIA",
"benefitId": 28,
"benefitName": "CONSULTA",
"schedule": {
"id": 26,
"name": "Nutrición"
},
"professionalName": "b",
"insurance": {
"id": 1387,
"name": "PRIVADOS"
},
"collective": {
"id": 26,
"name": "Privados"
},
"typeId": 1,
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {},
"appoState": {
"id": 3,
"name": "Atendiendo"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503037036812
}, {
"appointmentId": 151,
"startDate": 1503039600000,
"patientId": 416,
"patientIdentification": {
"id": 1,
"name": "18466341D"
},
"episodeId": 500350,
"chn": "500057",
"patientName": "Gloria Sena Arrayán",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "NEUROLOGIA",
"benefitId": 45,
"benefitName": "CONSULTA",
"schedule": {
"id": 30,
"name": "Neurologia"
},
"professionalName": "b",
"insurance": {
"id": 1396,
"name": "AGRUPACION MUTUAL ASEGURADORA (AMA)"
},
"collective": {
"id": 30,
"name": "Trafico"
},
"typeId": 1,
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {},
"appoState": {
"id": 4,
"name": "Atendido"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503038643436
}, {
"appointmentId": 154,
"startDate": 1503298800000,
"patientId": 389,
"patientIdentification": {
"id": 1,
"name": "23234567J"
},
"episodeId": 500359,
"chn": "500030",
"patientName": "maria perez perez",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "ENDOCRINOLOGIA",
"benefitId": 28,
"benefitName": "CONSULTA",
"schedule": {
"id": 26,
"name": "Nutrición"
},
"professionalName": "a",
"insurance": {
"id": 1387,
"name": "PRIVADOS"
},
"collective": {
"id": 26,
"name": "Privados"
},
"typeId": 1,
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {
"id": 2,
"name": "Accidente causal"
},
"appoState": {
"id": 3,
"name": "Atendiendo"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503297627789
}, {
"appointmentId": 148,
"startDate": 1503300600000,
"patientId": 415,
"episodeId": 500346,
"chn": "500056",
"patientName": "Pastora Meseguer Carrión",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "NEUROLOGIA",
"benefitId": 45,
"benefitName": "CONSULTA",
"schedule": {
"id": 30,
"name": "Neurologia"
},
"professionalName": "a",
"insurance": {
"id": 1387,
"name": "PRIVADOS"
},
"collective": {
"id": 25,
"name": "Privados todos"
},
"typeId": 1,
"guarantorStatus": {
"id": 7,
"name": "No requerida"
},
"reason": {},
"appoState": {
"id": 4,
"name": "Atendido"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1502885871664
}, {
"appointmentId": 152,
"startDate": 1503302400000,
"patientId": 416,
"patientIdentification": {
"id": 1,
"name": "18466341D"
},
"episodeId": 500351,
"chn": "500057",
"patientName": "Gloria Sena Arrayán",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "NEUROLOGIA",
"benefitId": 46,
"benefitName": "REVISION",
"schedule": {
"id": 30,
"name": "Neurologia"
},
"professionalName": "a",
"insurance": {
"id": 1396,
"name": "AGRUPACION MUTUAL ASEGURADORA (AMA)"
},
"collective": {
"id": 30,
"name": "Trafico"
},
"typeId": 1,
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {},
"appoState": {
"id": 4,
"name": "Atendido"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503038674027
},{
"appointmentId": 156,
"startDate": 1503302400000,
"patientId": 389,
"patientIdentification": {
"id": 1,
"name": "23234567J"
},
"episodeId": 500361,
"chn": "500030",
"patientName": "maria perez perez",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "PEDIATRIA",
"benefitId": 3,
"benefitName": "CONSULTA",
"schedule": {
"id": 29,
"name": "Dra. De la Vega"
},
"professionalName": "a",
"insurance": {
"id": 1387,
"name": "PRIVADOS"
},
"collective": {
"id": 26,
"name": "Privados"
},
"typeId": 1,
"observations": "obs",
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {
"id": 2,
"name": "Accidente causal"
},
"appoState": {
"id": 3,
"name": "Atendiendo"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503300374408
},{
"appointmentId": 142,
"startDate": 1503298800000,
"patientId": 412,
"episodeId": 500337,
"chn": "500053",
"patientName": "Mariano López Pastor",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "NEUROLOGIA",
"benefitId": 45,
"benefitName": "CONSULTA",
"schedule": {
"id": 30,
"name": "Neurologia"
},
"professionalName": "b",
"insurance": {
"id": 1387,
"name": "PRIVADOS"
},
"collective": {
"id": 25,
"name": "Privados todos"
},
"typeId": 1,
"guarantorStatus": {
"id": 7,
"name": "No requerida"
},
"reason": {},
"appoState": {
"id": 4,
"name": "Atendido"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1502877885393
}, {
"appointmentId": 158,
"startDate": 1503303300000,
"patientId": 408,
"patientIdentification": {
"id": 2,
"name": "123123"
},
"episodeId": 500363,
"chn": "500049",
"patientName": "ANA CARO MARTINEZ",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "PEDIATRIA",
"benefitId": 3,
"benefitName": "CONSULTA",
"schedule": {
"id": 29,
"name": "Dra. De la Vega"
},
"professionalName": "b",
"insurance": {
"id": 1749,
"name": "ADMIRAL INSURANCE"
},
"collective": {
"id": 13,
"name": "Trafico"
},
"typeId": 1,
"observations": "dewdfe",
"guarantorStatus": {
"id": 1,
"name": "Solicitada"
},
"reason": {
"id": 2,
"name": "Accidente causal"
},
"appoState": {
"id": 3,
"name": "Atendiendo"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503301904789
}, {
"appointmentId": 159,
"startDate": 1503304200000,
"patientId": 48,
"patientIdentification": {
"id": 5,
"name": "1425871"
},
"episodeId": 500364,
"chn": "186",
"patientName": "cayetana jimenez brotons",
"centerName": "HOSPITAL CLINICA BENIDORM",
"serviceName": "PEDIATRIA",
"benefitId": 4,
"benefitName": "REVISION",
"schedule": {
"id": 29,
"name": "Dra. De la Vega"
},
"professionalName": "b",
"insurance": {
"id": 1390,
"name": "MAPFRE ESPAÑA, CIA. DE SEGUROS Y REASEGUROS S.A."
},
"collective": {
"id": 4,
"name": "MAPFRE SALUD"
},
"typeId": 1,
"observations": "dfd",
"guarantorStatus": {
"id": 7,
"name": "No requerida"
},
"reason": {
"id": 2,
"name": "Accidente causal"
},
"appoState": {
"id": 3,
"name": "Atendiendo"
},
"appoType": {
"id": 1,
"name": "Simple"
},
"professionalCreationName": "Marisol Fernández Lleras",
"creationDate": 1503301999486
}
]
내가 보여 각 행의 전체 데이터 집합을 통과하기 위해 무엇을 할 수 있는가? 고마워요