Jump to content
Changes to the Jaspersoft community edition download ×

How to auto table Excel width?


myusername01011

Recommended Posts

Hi,I'm using (Luna Eclipse and) TIBCO Jaspersoft® Studio - Visual Designer for JasperReports: . JasperReports Library and Tools 6.4.0.final (without the server) with both preview and export being set to XLSx.  My table element (seleted from the Palette) appears to be giving me "Element reaches outside table detail contents .... ...JRDesignTextField...", despite  having the following properties:

                                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
                                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                                    <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
                                    <property name="net.sf.jasperreports.export.xls.wrap.text" value="false"/>

I did notice that despite these settings: the (seemingly required? parent elements') width settings on the column and reportElement are the likely culprits:

<jr:column width="68" uuid="d674b459-5091-4f10-8450-d46ca9f04908">
                        <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                        <jr:tableHeader style="Table_TH" height="30"/>
                        <jr:detailCell style="Table_TD" height="30">
                            <property name="com.jaspersoft.studio.unit.width" value="px"/>
                            <property name="com.jaspersoft.studio.unit.height" value="px"/>
                            <textField>
                                <reportElement x="0" y="0" width="118" height="30" uuid="382cfbfc-4b32-47ba-b7ed-c4dc0790ac29">
                                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
                                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                                    <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
                                    <property name="net.sf.jasperreports.export.xls.wrap.text" value="false"/>
                                </reportElement>
                                <textFieldExpression><![CDATA[$F{Status}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>

JasperSoft Studio reverted my pointless attempts at removing the column and reportElement widths.  What changes must be made to get the full benefit of my excel properties inside my table element?  Is there an auto width for column and reportElement (like a "reverse inheritance" since the width of the cell data should "propagate up")? 

Link to comment
Share on other sites

  • 1 year later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

I'm facing the same problem. though 

                                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
                                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                                    <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
                                    <property name="net.sf.jasperreports.export.xls.wrap.text" value="false"/>

works with XLS it is not working with XLSx

did you find a solution ???

 

Thank You

Monty

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...