Jump to content
We've recently updated our Privacy Statement, available here ×

Is it possible to name a frame?


razvan_s

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The reportElement key is one way to tag the elements in general.

You can use this Key tag to reference the element. in the below jrxml I'm hiding the $F{DUMMY} inside the frame when exported to xlsx.

<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0  --><!-- 2017-05-10T13:07:52 --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="printSheetName" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b6735bd2-5665-45f8-86c7-02b39d58c5f2">    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>    <property name="net.sf.jasperreports.export.xlsx.exclude.key.Hell"/>    <parameter name="SheetName" class="java.lang.String"/>    <queryString>        <![CDATA[select * from dual]]>    </queryString>    <field name="DUMMY" class="java.lang.String"/>    <background>        <band splitType="Stretch"/>    </background>    <columnHeader>        <band height="30" splitType="Stretch">            <staticText>                <reportElement x="0" y="0" width="100" height="30" uuid="fc5b9b93-e496-4cac-903c-748cb3e3bcbf"/>                <text><![CDATA[DUMMY]]></text>            </staticText>        </band>    </columnHeader>    <detail>        <band height="30" splitType="Stretch">            <textField>                <reportElement x="0" y="0" width="100" height="30" uuid="c59d9bdd-8524-4b14-ba30-5a833f72a1bc">                    <propertyExpression name="net.sf.jasperreports.export.xls.sheet.name"><![CDATA[$P{SheetName}]]></propertyExpression>                </reportElement>                <textFieldExpression><![CDATA[$F{DUMMY}]]></textFieldExpression>            </textField>        </band>    </detail>    <summary>        <band height="200">            <frame>                <reportElement key="Hell" x="0" y="0" width="200" height="200" uuid="7f13428c-0551-41be-b18a-b9a6b49ed966"/>                <textField>                    <reportElement x="0" y="0" width="100" height="30" uuid="281f4da6-f67d-48b2-868c-4c050d2f36f3">                        <propertyExpression name="net.sf.jasperreports.export.xls.sheet.name"><![CDATA[$P{SheetName}]]></propertyExpression>                    </reportElement>                    <textFieldExpression><![CDATA[$F{DUMMY}]]></textFieldExpression>                </textField>            </frame>        </band>    </summary></jasperReport>[/code]

 

 

 

 

Link to comment
Share on other sites

tried chaging the source code and add a name to the frame, but the api does not allow it.

I believe there is no way to get this functionality in the current version.

please raise a request with the support, so that they can add it in the next releases.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...