我已经安装了jasper-rails 1.0.3并按照https://github.com/fortesinformatica/jasper-rails的说明进行操作。我的java安装很好。
这是我的控制器代码:
class ReportsController < ApplicationController
respond_to :html, :xml, :pdf
def index
@council_report = CouncilReport.find(params[:council_report_id])
end
def proposed_works_summary
@council_report = CouncilReport.find(params[:council_report_id])
@proposed_works_summary = proposed_works_summary_data(@council_report.id)
respond_with @proposed_works_summary
end
end
我的routes.rb:
...
resources :reports, only: [:index] do
member do
get 'proposed_works_summary'
end
end
...
以下是浏览器中的错误:
缺少模板
缺少模板报告/ proposed_works_summary,application / proposed_works_summary with {:locale =&gt; [:en],:formats =&gt; [:html],:variants =&gt; [],:handlers =&gt; [:erb ,:builder,:raw,:ruby,:jbuilder,:coffee]}。搜索:*“d:/ Users / Michael / Documents / Aptana Workspace / cam / app / views”
现在我显然有一个proposed_works_summary.jrxml iReport文件,我按如下方式设置了queryString:
<queryString language="XPath">
<![CDATA[/reports/proposed_works_summary]]>
</queryString>
我详细检查了演示https://github.com/fortesinformatica/jasper-rails-demo,看不出我错过了什么。请帮助一点?