最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jasper reports - Problem with jasperreports-html-component when updating to Jasperreports 7.0.0 - Stack Overflow

programmeradmin5浏览0评论

I have to update from Jasperreports 6.8.1 to Jasperreports 7.0.0 (in a Maven Java project) , the mayority of .jrxml work fine by recompiling them in the newer version. the problem is that I have some that includes html using the jasperreports-html-component and I don´t know what to do.

I have not created those reports (or others in other apps of my anization) and I have to know how to make then work with the 7.0.0 version.

I simplified the report to show you just what is the problem:

<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="; xmlns:xsi="; xsi:schemaLocation=" .xsd" name="informe1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="4cc9a12d-b3c0-4acb-b5e1-ff8aa58e16c0">
    <field name="titulo" class="java.lang.String"/>
    <field name="csv" class="java.lang.String"/>
    <field name="tabulacion" class="java.lang.String"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band splitType="Stretch"/>
    </title>
    
    <detail>
        <band height="21" splitType="Stretch">
            <componentElement>
                <reportElement x="12" y="7" width="336" height="10" uuid="cf102a37-b7bc-4921-a6fd-c86cffec5467"/>
                <hc:html xmlns:hc="; xsi:schemaLocation=" .xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
                    <hc:htmlContentExpression>
                        <![CDATA[
                            "<div style='font-weight: bold; height: 30px; vertical-align: middle; font-size:30px;'>"
                            +$F{tabulacion}+$F{titulo}+"&nbsp;</div>"
                        ]]>
                    </hc:htmlContentExpression>
                </hc:html>
            </componentElement>
        </band>
    </detail>
</jasperReport>

This simplified version of the report works fine with Jasperreports 6.8.1.

There is any way to make it work?

Thank you.

发布评论

评论列表(0)

  1. 暂无评论