报表打印在 Linux 下出错
-
我的报表已经设计好,在window下运行都没有问题,但是部署到linux下就出错。
我使用的是 base_report_cn来实现中文的,请知道解决办法的兄弟姐妹们帮忙,急急急。Traceback (most recent call last):
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/service/web_services.py", line 687, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/report_sxw.py", line 364, in create
return fnct(cr, uid, ids, data, report_xml, context)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/report_sxw.py", line 421, in create_source_pdf
return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/report_sxw.py", line 439, in create_single_pdf
pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/interface.py", line 199, in create_pdf
obj.render()
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/render.py", line 50, in render
result = self._render()
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml.py", line 41, in _render
return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/addons/base_report_cn/init.py", line 86, in convert2TrueType
return method(data, myargs, **argv)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 780, in parseNode
r.render(fp)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 195, in render
pt_obj.render(el)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 770, in render
fis += r.render(node_story)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 700, in render
return process_story(node_story)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 693, in process_story
flow = self._flowable(node)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 607, in _flowable
return self._table(node)
File "/home/chengwenge/bin/5.0.6/openerp-server-5.0.6/bin/report/render/rml2pdf/trml2pdf.py", line 525, in _table
assert length == len(node.get('colWidths').split(','))
AssertionError -
搞定了,哈哈,列数不一致,但是在window下不报错,在linux 下才报错。