기타
[기타] Jasper - Subreport 경로 설정
hrming
2024. 7. 9. 15:12
로컬에서 잘 나오던 Jasper Report가, 개발서버에서는 열리지 않았다.
Subreport를 연결할 때, 로컬 경로 + 파일명을 사용했는데 개발서버에는 해당 경로가 없어 발생한 문제였다.
(예를 들면, "C:\Users\test" + "subreport.jasper"로 Subreport를 지정해 줬는데, 개발서버에는 해당 경로 자체가 없음.)
결국, 주소를 파라메터에 입력하고 파라메터값 + 파일명으로 서브레포트를 지정하므로써 해결했다.
$P{ report_path } + "subreport.jasper"
** $P{report_path} 값은 "C:\Users\test" 이고, 개발서버에서는 이를 다르게 지정
참고 :
https://stackoverflow.com/questions/18656016/jasperreports-cant-locate-subreport
JasperReports: Can't locate subreport
It's drives me crazy.. Last hour I am trying to figure out why my report stopped to worked right after I added a subreport to it.. I already checked and tried all similar issues here, here and here.
stackoverflow.com