Jump to content
We've recently updated our Privacy Statement, available here ×

textAlignment="Right" has no effect


martin.clarke

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks peter.w

This 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

Hi

Yes 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 want

There are only two other areas I can suggest having a look at

1) 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

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.

Regards

Martin

 

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