Jump to content
Changes to the Jaspersoft community edition download ×

Alignment not work


Recommended Posts

I work in JasperStudio 6.3.1 and I have a problem with alignment horitzontal in text field, in my report i put the alignment center or rigth but when execute the file compiled with java the result is the text in left. I tried to remove the style, markup and add to styles alignment horitzontal, but not work. 

The xml of text field:

<textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">   <font fontName="Arial" size="10" isBold="true" isItalic="true"/>   <paragraph lineSpacing="Single"/></textElement><textFieldExpression>   <![CDATA[$F{DESCRIPCIONCAR}]]></textFieldExpression>[/code]

The styles of the text field:

<style name="style1" isDefault="true" fontName="Myriad Pro" isBold="true"       isItalic="true" isUnderline="false" isStrikeThrough="false">   <conditionalStyle>      <conditionExpression>         <![CDATA[$P{PHOTO}.contains( "AZUL" )]]>      </conditionExpression>      <style forecolor="#3F109E"/>   </conditionalStyle>   <conditionalStyle>      <conditionExpression>         <![CDATA[$P{PHOTO}.contains( "ROJO" )]]>      </conditionExpression>      <style forecolor="#E61518" hTextAlign="Center" hImageAlign="Center"/>   </conditionalStyle>   <conditionalStyle>      <conditionExpression>         <![CDATA[$P{PHOTO}.contains( "VERD" )]]>      </conditionExpression>      <style forecolor="#2EB242"/>   </conditionalStyle>   <conditionalStyle>      <conditionExpression>         <![CDATA[$P{PHOTO}.contains( "TARONJA" )]]>      </conditionExpression>      <style forecolor="#EC7E1D"/>   </conditionalStyle></style><style name="style2" forecolor="#FFFFFF" backcolor="#FFFFFF"       isBlankWhenNull="false" fontName="Arial" fontSize="12"       isBold="false" isItalic="false" isUnderline="false"       isStrikeThrough="false">   <conditionalStyle>      <conditionExpression>         <![CDATA[($F{PRECIO}.length() != 6)]]>      </conditionExpression>      <style mode="Transparent" backcolor="#FFFFFF" hTextAlign="Left"             hImageAlign="Left" fontName="Arial" fontSize="48" isBold="false"             isItalic="false" isUnderline="false" isStrikeThrough="false"/>   </conditionalStyle></style>[/code]

Any solution?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 2 weeks later...

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