Jump to content
We've recently updated our Privacy Statement, available here ×

ujjawalkhare11

Members
  • Posts

    6
  • Joined

  • Last visited

Community Answers

  1. ujjawalkhare11's post in "com.jaspersoft.jasperserver.api.JSException: Error filling report" and "net.sf.jasperreports.engine.JRException: Resource not found" was marked as the answer   
    Here is the solution:
    1. login to jasperserver.
    2. Go to View-->Repositry
    3. Right click on Reports-->Add Resource-->File-->jrxm
    4. Choose below:
    a. Type of File: JRXML
    b. 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_subreport3
    d. 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-->JasperReport
    b. 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"
×
×
  • Create New...