Reputation: 1936
I have installed jasper plugins for my grails application. Then in the list.groovy page I have modify the code:
<g:paginate total="${Race.count()}" /> </div>
<g:jasperReport jasper="all-races" format="PDF" name="All Races" />
then I start the grails app. In list.gsp page, an pdf icon has been displayed. but when I click on it. it's showing error:
Error 500: Executing action [index] of controller [org.codehaus.groovy.grails.plugins.jasper.JasperController] in plugin [jasper] caused exception: null
Servlet: grails
URI: /cirnele/grails/jasper.dispatch
Exception Message: No such report spec: /reports/all-races (jasper or .jrxml)
Caused by: No such report spec: /reports/all-races (jasper or .jrxml)
Class: Unknown
At Line: [-1]
Code Snippet:
Actually I dont know how to use iReport to generate jasper file.
Upvotes: 2
Views: 3435
Reputation: 34011
As the exception states, make sure you have your report generated in the directory you specified. You may want to take a look at this documentation.
Upvotes: 2
Reputation: 5538
Copy your .jrxml file into e.x grails-app\reports then add this line into your config.groovy or simply point it to the location of your report.
jasper.dir.reports = 'reports'
Upvotes: 1