Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9103299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:36:12+00:00 2026-06-17T01:36:12+00:00

Jasper reports can use external templates and subreports referred in .jrxml file as follows:

  • 0

Jasper reports can use external templates and subreports referred in .jrxml file as follows:

<template><![CDATA["repo:template.jrtx"]]></template>
<subreportExpression><![CDATA["repo:subreport.jrxml"]]></subreportExpression>

This works perfectly when run on the Jasper server, but when launched in-process from Java Code it returns errors like:

net.sf.jasperreports.engine.JRException: Resource not found at : repo:template.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)

In Jasper designer resources are added to Resources list that is not stored within the report file. How can I do the same with RepositoryUtil? I.e. tell RepositoryUtil to replace “repo” with some real location? The code I use:

Connection conn = ... ;
String reportSource = "C:\\report.jrxml";
Map<String, Object> params = new HashMap<String, Object>();
JasperReport jasperReport = JasperCompileManager.compileReport(reportSource);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, conn);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:36:13+00:00Added an answer on June 17, 2026 at 1:36 am

    That’s certainly a classpath issue

    Jasper tries to load resources firstly as an absolute path, then as a relative path through the app classpath

    You can try to cope wih absolute paths for templates and subreports, it should work

    You can try also to put the resource directory in the classpath of the app with a -cp "/path/to/resourceDir/*"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use Jasper reports and build the report without templates. How
I need to download jasper reports professional trail version, can anyone help?
I'm losing a lot of hair trying to learn how to use Jasper reports.
Hi I am trying to use Jasper (4.0.2) reports with JBoss 6 using an
Until now I have always been constrained by one thing with jasper-reports. I can
I'm trying to use Jasper Reports to help with reporting in my application. I
I'm using Jasper Reports and iReport to generate the reports of my app. I
I am new to Jasper Reports. I have just installed i-report 4.5.1 and wants
I need to put images in my Jasper reports that match rows in a
Could somebody please tell me how I can configure iReport 3.5 (nb) to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.