fredand44 Posted May 19, 2010 Share Posted May 19, 2010 Hello!I use jasperreport to create reports in pdf and excel.In the reports we display some dates like 2010-05-01 Everything works fine when I run it in my own dev-environmonet but when we run it on our test-server we just get dates dispalyed like: 2010-05-...the day is missing as you can see.We fetch the data from a Oracle databas.If any one got any clue how to solve this please let me know.Best regardsFredrik Link to comment Share on other sites More sharing options...
asejas Posted May 19, 2010 Share Posted May 19, 2010 Can you post a piece of your report template in order to explain your problem?I think you can be missing the pattern for the date.Code:<textField isBlankWhenNull="true" isStretchWithOverflow="true" pattern="dd/MM/yyyy"> <reportElement x="400" y="0" width="150" height="12" style="detailStyle" stretchType="RelativeToTallestObject" mode="Opaque"/> <box padding="1"> <pen lineColor="#000000" lineStyle="Solid"/> </box> <textElement textAlignment="Left"/> <textFieldExpression class="java.util.Date"> <![CDATA[$F{purchaseDate}]]></textFieldExpression> </textField> Link to comment Share on other sites More sharing options...
itchytoes Posted May 19, 2010 Share Posted May 19, 2010 Hi -- I've seen this problem. I develop on a windows machine, but production is running on a Linux machine. In my case, the box allowed for the data is just not quite big enough and somehow the padding wipes out the trailing text. Can you try making your box a little bigger, or decreasing your padding if you are using padding? Or, you can try decreasing your font size Link to comment Share on other sites More sharing options...
fredand44 Posted May 20, 2010 Author Share Posted May 20, 2010 Hello Guys!Thanks for your help guys, without you I would not have solved this problem.As you said the box was a bit too small.I shrinked the size of the typo from 10 to 8 and voila the date showed.(I do was missing the pattern as well)Btw we also develop on windows and test it in linux.Best regardsFredrik Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now