导出为ex​​cel格式的Jasper报告未显示背景颜色 [英] Jasper report exported to excel format is not displaying the background colour

查看:286
本文介绍了导出为ex​​cel格式的Jasper报告未显示背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jasper reports-4.5.0。使用这个我正在生成报告并导出到不同的格式,如pdf,csv,xls,html。除.xls格式外,所有工作正常。当我将报告导出到.xls时,它不会向页眉头带显示背景颜色。我使用的代码如下。页面标题区内

I am using jasper reports-4.5.0 . Using this I am generating the reports properly and exporting to different formats like pdf,csv,xls,html. All are working fine except the .xls format. When I export my report to .xls it is not displaying the background colour to the pageheader band. The code I am using is as below. Inside the page header band

<image>
    <reportElement mode="Opaque" x="0" y="0" width="236" height="57" backcolor="#E6E6E6"/>
    <imageExpression><![CDATA[new File($P{Image}, "images/flower-logo.png")]]></imageExpression>
</image>

对于花卉图像,我正在应用背景颜色。除了.xls格式之外,它还有其他所有格式。可能是excel格式的问题。

To the flower image I am applying the background colour. It is coming in all the other formats except the .xls format. What could be the problem with excel format.

推荐答案

JasperReports XLS导出器仅支持标准的Excel调色板。我想你可以在这里看到颜色列表。 http://dmcritchie.mvps.org/excel/colors.htm

JasperReports XLS exporters only support the standard Excel color palette. I think you can see the color list here. http://dmcritchie.mvps.org/excel/colors.htm

这篇关于导出为ex​​cel格式的Jasper报告未显示背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆