martin.clarke Posted April 30, 2015 Share Posted April 30, 2015 The Jasper documentation is unbelievable. How does one align output? Everything aligns left. I've changed <textElement> to <textElement textAlignment="Right"> to no effect.Any ideas? Link to comment Share on other sites More sharing options...
peter.w Posted April 30, 2015 Share Posted April 30, 2015 This should work.<textElement textAlignment="Right"></textElement>[/code]( Link to comment Share on other sites More sharing options...
martin.clarke Posted April 30, 2015 Author Share Posted April 30, 2015 Thanks peter.w, please see my comment! Link to comment Share on other sites More sharing options...
martin.clarke Posted April 30, 2015 Author Share Posted April 30, 2015 Thanks peter.wThis is SO frustrating. I just posted a detailed reply and there's no sign of it. This works but aligns left. If I incorporate your suggestion naively it errors. If I implement it slightly more intelligently, it doesn't error, but doesn't work.This is a diabolical interface. I posted this twice as an Answer and it failed.<textField isStretchWithOverflow="true"> <reportElement style="Detail" positionType="Float" x="333" y="0" width="111" height="18" uuid="8dd14df6-2cf5-4bd2-b126-886246c57f8b"/> <textElement> <font size="14"/> </textElement> <textElement textAlignment="Right"> <----- </textElement> <----- <textFieldExpression><![CDATA[$F{timeworked}]]></textFieldExpression></textField><textField isStretchWithOverflow="true"> <reportElement style="Detail" positionType="Float" x="333" y="0" width="111" height="18" uuid="8dd14df6-2cf5-4bd2-b126-886246c57f8b"/> <textElement textAlignment="Right"> <----- <font size="14"/> </textElement> <----- <textFieldExpression><![CDATA[$F{timeworked}]]></textFieldExpression></textField>[/code] Link to comment Share on other sites More sharing options...
peter.w Posted April 30, 2015 Share Posted April 30, 2015 HiYes I know some times my posts go all wonky on here as well. And when you are already having problems its the last thing you wantThere are only two other areas I can suggest having a look at1) The styles eg <style name="Style1"/> If you have any? Try without any styles? 2) Any markups eg markup="styled" but this is _usually_ in the textElement and you don't have any.Other than that I am out of ideas. Link to comment Share on other sites More sharing options...
martin.clarke Posted May 1, 2015 Author Share Posted May 1, 2015 Thank you very much peter.w - I'll soldier on!I'll be back soon with other dumb questions.RegardsMartin Link to comment Share on other sites More sharing options...
martin.clarke Posted May 1, 2015 Author Share Posted May 1, 2015 Stroll on Peter. Hope against experience said try to progress the thread with an Answer or Edit, but it has to be a Comment again:WHA HOO! Not only must one do it for the column detail, one must do it for the column header: <columnHeader> <band height="26" splitType="Stretch">... <staticText> <reportElement style="Column header" x="333" y="7" width="111" height="18" forecolor="#000000" uuid="c403ee30-44b8-44fb-8775-fd9be9db62d0"/> <textElement textAlignment="Right"> <----- <font isBold="false"/> </textElement> <text><![CDATA[Hours Worked]]></text> </staticText>... </band> </columnHeader> <detail> <band height="18" splitType="Stretch"> <frame>... <textField isStretchWithOverflow="true"> <reportElement style="Detail" positionType="Float" x="333" y="0" width="111" height="18" uuid="8dd14df6-2cf5-4bd2-b126-886246c57f8b"/> <textElement textAlignment="Right"> <----- <font size="14"/> </textElement> <textFieldExpression><![CDATA[$F{timeworked}]]></textFieldExpression> </textField>... </frame> </band> </detail> [/code]Now we know peter! You probably did anyway and assumed I wasn't a TOTAL noob! : )Thanks again for being part of the process.RegardsMartin Link to comment Share on other sites More sharing options...
martin.clarke Posted May 1, 2015 Author Share Posted May 1, 2015 As I say on my next Comment above Peter, WAH-HOO! 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