I just finished my java project. It is made from netbeans6.9.1. It can generate report I made in jasperreport (using iReport), composed of subreports. It works perfectly in netbeans, but when I clean and build it, then tried to run the jar file in cmd (my OS is Windows XP SP3), it produces an error Could not load object from.... It points to the subreport file.
Here are some usefule infos (found in the properties of subreport):
Subreport Expression : $P{SUBREPORT_DIR} + “report1.jasper”.
Connection type : Use a connection expression
Connection Expression : $P{REPORT_CONNECTION}
Please help me. It’s my first time to deploy a project. Replies are greatly appreciated.
I’ve already found the answer for this. For those who will encounter the same problem, I just put my report folder the same level of executable jar file (from clean and build, inside dist folder) then made the Subreport Expression (in the subreport properties of the main report) as
"./" + $P{SUBREPORT_DIR} + "report_name.jasper"