Jump to content

Excel cell formatting is not evertime set.


inditrozen

Recommended Posts

Hi All,

 

I have a strange issue here with Excel report. Excel report doesnot show the cell formatting sometimes.

 

For e.g. date field is shown sometimes with the correct pattern dd/MM/yyyy but sometimes it is shown like "39157"

When this happens, all cells with decimal formatting, bold column headers, borders everything is displayed by ignoring their pattern, alignment and style.

 

JRXML field example is here.

 

<textField isStretchWithOverflow="true" pattern="dd.MM.yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="170"

y="0"

width="61"

height="24"

key="textField-10"

stretchType="RelativeToTallestObject"/>

<box topBorder="None" topBorderColor="#000000" topPadding="2" leftBorder="Thin" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="4" bottomBorder="Thin" bottomBorderColor="#000000" bottomPadding="2"/>

<textElement textAlignment="Right">

<font fontName="Arial" size="8"/>

</textElement>

<textFieldExpression class="java.util.Date"><![CDATA[$F{APPL_DATE}]]></textFieldExpression>

</textField>

 

It can be everytime reproducible, After trying to open the report second or third time it started appearing.

 

If use of Pattern is not recommended and I should always use Strings for outputting Date and Double.

 

Has somebody similar problem and know the solution?

 

Thanks and Regards

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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