ujjawalkhare11 Posted September 27, 2013 Share Posted September 27, 2013 Hi Attached is the copy of my jasper report which has 3 subreports in it. While running it I am getting below errors:Please help to crossveryfy the rxml and let me know if this error is due to subreport path or I need any other modification ?Error Messagecom.jaspersoft.jasperserver.api.JSException: Error filling reportError Tracecom.jaspersoft.jasperserver.api.JSException: Error filling report at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$FillResultListener.reportFillError(EngineServiceImpl.java:1030) at net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:211) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:135) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:733) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:695) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1474) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: net.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation(RepositoryUtil.java:255) at net.sf.jasperreports.repo.RepositoryUtil.getReport(RepositoryUtil.java:208) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:329) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:359) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:287) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:457) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:337) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:273) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:144) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) ... 9 moreError Messagenet.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxmlError Tracenet.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation(RepositoryUtil.java:255) at net.sf.jasperreports.repo.RepositoryUtil.getReport(RepositoryUtil.java:208) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:329) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:359) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:287) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:457) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:337) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:273) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:144) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:733) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:695) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1474) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Link to comment Share on other sites More sharing options...
sjoerd.jump Posted September 27, 2013 Share Posted September 27, 2013 At a first glance this looks like a path issue Caused by: net.sf.jasperreports.engine.JRException: Resource not found at : ////reports////subreports////report8_subreport1.jrxml[/code]I'd say, check your path. I encounterd a similair issue when running a report with subreports in iReport Designer while the report was on the Jasperserver (imported via the repositorybroweser)Later i figured i only could preview the report through the Japserserver. Link to comment Share on other sites More sharing options...
ujjawalkhare11 Posted September 27, 2013 Author Share Posted September 27, 2013 Hi I have changed path as suggested by you and now it says:- "Repository file resource ////reports////subreports////report8_subreport1.jrxml could not be loaded" My jrxml file entry is as below: $P{REPORT_CONNECTION} "repo:////reports////subreports////report8_subreport1.jrxml" Link to comment Share on other sites More sharing options...
Solution ujjawalkhare11 Posted September 27, 2013 Author Solution Share Posted September 27, 2013 Here is the solution:1. login to jasperserver.2. Go to View-->Repositry3. Right click on Reports-->Add Resource-->File-->jrxm4. Choose below:a. Type of File: JRXMLb. Upload subreport.jrxml from your system (if more then one subreports then upload one by one after you complete procedure of uploading frist jrxml file.)c. Give a name for your jrxml file in name field. (In my case i gave name as report8_subreport1, report8_subreport2 and report8_subreport3d. save loacation: /reports and click on submit.5. After you upload all subreports now its time to edit subreport dir in main.jrxml file.Follow the steps below.Note. Name given to subreport jrxml files is actually should be involved in jrxml dir path. so here our path of subreports should follow below patterns:"repo:/reports/<name_of_subreport>"so in my case this path will be :"repo:/reports/report8_subreport2"so in main.jrxml file i will have to mention like below:<subreportExpression><![CDATA["repo:/reports/report8_subreport1"]]></subreportExpression><subreportExpression><![CDATA["repo:/reports/report8_subreport2"]]></subreportExpression><subreportExpression><![CDATA["repo:/reports/report8_subreport3"]]></subreportExpression> Be noted that in DefaultValueExpression field we need to give local path of our system where main.jrxml file is saved.for reference i am also attaching my main.jrxml file here (report10-Copy.jrxml)6. Now once editing of main.jrxml is done again follow the steps that were used to upload subreport.jrxml files.7. Now its time to create a link with database to run our report:a. Go to report-->Add Resource-->JasperReportb. Give a name to report (this name will be the link to run your report)c. choose "select a jrxml from repositry" and under brouse in "Reports" you can find your main.jrxml file as a namethat was choosen by you while uploaded main.jrxml. d. click on datasource and choose a database connection from which you are retrieving the report.e. Click on submit.Now your report is ready to run. Just click on link of you final setup (will appear under "Reports") and your report will run. "HAVE FUN" Link to comment Share on other sites More sharing options...
hishamkmr Posted October 2, 2013 Share Posted October 2, 2013 Try this as subreport expression<![CDATA["repo:/reports/subreports/report8_subreport1_jrxml"]]> hopes it helps..let me know.. Link to comment Share on other sites More sharing options...
andreasX Posted December 5, 2013 Share Posted December 5, 2013 general solution to this is described here: http://stackoverflow.com/a/20374515/1915920 Link to comment Share on other sites More sharing options...
s.jyothsna1 Posted December 19, 2013 Share Posted December 19, 2013 No I have tried by keeping this expression "repo:/reports/subreports/report8_subreport1_jrxml" also... I got the same error like "/reports/Filename.jrxml" file could not be loaded. May I know the reason? Thank you Link to comment Share on other sites More sharing options...
s.jyothsna1 Posted December 19, 2013 Share Posted December 19, 2013 File could not be loaded means something is wrong with jrxml file..I didn't have passed the parameter to subreport. Any how its working fine now.. Thank you Link to comment Share on other sites More sharing options...
vivek_satle Posted September 23, 2015 Share Posted September 23, 2015 I am using parameter with subreport and got error "Repository file resource /reports/sinc/07.Cargue_por_entidades_obligadas_subreport1 could not be loaded" 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