Linestyle problem in iReport

Hi, 

I use iReport 5.5.0.

When I design report, I click on text field and chose its border and padding with double line line style. But when I run it within iReport preview or deploy it to Jasperreports server, there is no double line output and it is replace with single line style.

Could anybody tell me the reason why?

Best regards, 

Sophanna

sophannaly's picture
Joined: Oct 11 2013 - 6:26pm
Last seen: 8 years 4 months ago

3 Answers:

Just tested it and it's working OK on Studio. You probably have pen width too small. Try increasing it.

BTW, which output format are you using?

hozawa's picture
190809
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

In iReport I already increase line width to 1.5 and I tested with xls and docx output format but it still just show as darker single line style. Did I miss any properties in report level?

sophannaly - 9 years 6 months ago

It works like you said if I tested in other section of report. In my case, I want to print it in crosstab. In my crosstab I have put some text fields as title and I choose it border padding as double line with width=1.75, but it still show as single line in excel output. Can anybody tell me why?

sophannaly - 9 years 6 months ago

Difficult to understand what you want to do. In your original post, you mentioned Text field but you're now talking about cross-tabs whch is a different component. Nevertheless, I can only say that the borders of a crosstab in attached report  look double line to me.

Attachments: 
AttachmentSize
Image icon crosstabborders.png29.19 KB
hozawa's picture
190809
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

Hi, sorry I forgot to mention that text field is in cross tab. I have a crosstab, and in crosstab I have put text fields as each column title. For text fields, I set border and padding to double line but when i export it in xls format, it shows only single line. Is it the problem with duplicate border between crosstab border and text fields border?

sophannaly - 9 years 6 months ago

It's unclear. If you view it within Jaspersoft Studio in Java preview, it is single or double line? Is the problem that you're not seeing double lines when you export to Excel?

Attach a simple example jrxml file on what you're trying to do. Don't attach your entire report because that'll take too much time to read.

hozawa - 9 years 6 months ago

Hi,

In ireport, it previews with double line. When I deploy it report server or export to xls format, it will shows as single line mode. Below is the testing code. Please tell me how to solve this?

<?xml version="1.0" encoding="UTF-8"?>
<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="report1" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e2a9505d-3547-4cf7-9d87-6cdbcb55780b">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.ignore.cell.border" value="false"/>
<style name="Crosstab Data Text" hAlign="Center"/>
<queryString>
<![CDATA[select * from revision]]>
</queryString>
<field name="revision_number" class="java.math.BigDecimal"/>
<field name="admin_code" class="java.math.BigDecimal"/>
<field name="geo_code" class="java.math.BigDecimal"/>
<field name="revision_type" class="java.lang.Integer"/>
<field name="submit_date" class="java.sql.Timestamp"/>
<field name="comment" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<summary>
<band height="42" splitType="Stretch">
<crosstab>
<reportElement x="0" y="0" width="555" height="42" uuid="839ea474-9d5b-4859-987f-4879e1797ffe"/>
<crosstabHeaderCell>
<cellContents>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="70" height="30" uuid="a8d3100a-0152-4994-a3a0-858fdb3c27cc"/>
<box>
<bottomPen lineWidth="2.75" lineStyle="Double"/>
<rightPen lineWidth="2.75" lineStyle="Double"/>
</box>
<textFieldExpression><![CDATA["hi"]]></textFieldExpression>
</textField>
</cellContents>
</crosstabHeaderCell>
<rowGroup name="admin_code" width="135" totalPosition="End">
<bucket class="java.math.BigDecimal">
<bucketExpression><![CDATA[$F{admin_code}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="70" height="25" uuid="6217f6b8-d03f-456a-8314-4c82beeededd"/>
<textFieldExpression><![CDATA[$V{admin_code}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement x="0" y="0" width="70" height="25" uuid="76649cb0-c39a-4884-b477-f2d1f1cc3938"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Total admin_code]]></text>
</staticText>
</cellContents>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="geo_code" height="30" totalPosition="End">
<bucket class="java.math.BigDecimal">
<bucketExpression><![CDATA[$F{geo_code}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="30" uuid="f1b429d2-5f6c-4056-9c97-cfabf7c9940a"/>
<textFieldExpression><![CDATA[$V{geo_code}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement x="0" y="0" width="50" height="30" uuid="849d5397-3781-4ffb-9847-a8cfa15ab2e8"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Total geo_code]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="revision_numberMeasure" class="java.lang.Integer" calculation="Count">
<measureExpression><![CDATA[$F{revision_number}]]></measureExpression>
</measure>
<crosstabCell width="50" height="25">
<cellContents>
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="47ba2ebb-76b9-4806-8b1a-837a4af3388d"/>
<textFieldExpression><![CDATA[$V{revision_numberMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell height="25" rowTotalGroup="admin_code">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="aab4c731-41ef-4540-9354-914d0d868ea7"/>
<textFieldExpression><![CDATA[$V{revision_numberMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="50" columnTotalGroup="geo_code">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="2b022ce1-af87-4413-b843-9fe6511fedff"/>
<textFieldExpression><![CDATA[$V{revision_numberMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell rowTotalGroup="admin_code" columnTotalGroup="geo_code">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="b8427d7f-b1ea-4c08-bf66-f8c400b6c50e"/>
<textFieldExpression><![CDATA[$V{revision_numberMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
</crosstab>
</band>
</summary>
</jasperReport>

Best regards,
Sophanna

sophannaly - 9 years 6 months ago

I've tested if I can put a text element with double line in a cross tab. I have to say there's no problem (see attached).

 

If you can't do it yourself, should get some professional support or assistance.

Attachments: 
AttachmentSize
Image icon crosstabs.png4.39 KB
hozawa's picture
190809
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago
Feedback
randomness