Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Conditional data alignment inside table's detail section
BirtRunn
Hi,
I am using table which is bound to dataset. I have dragged datasetrow inside each column so that means table column is mapped with output column of dataset.
I have one requirement where for some specific data, I need to change alignment of the data which is being displayed in table's detail section.
I tried if I could do something in 'Expression' for datasetrow. But we can't, I believe.
I removed 'DataSetRow' and used 'Text' where I tried if I could use any alignment html tag inside VALUE-OF. But no success.
Does any body know how to achieve this?
Thanks in advance.
Find more posts tagged with
Comments
thuston
Do you not have your 'Property Editor' View open?
The Data control has a full set of Font format and alignment buttons.
The containing cell also has a Vertical alignment setting to adjust where the control orients for very tall rows.
Also in the 'Property Editor' for Data controls are Map and Highlights tabs.
Use Map for data transformation (if null then $0.00)
Use Highlight to conditionally change the Font formatting.
thuston
I see what you were talking about. <br />
<br />
The Highlight does not have alignment options.<br />
Please <a class='bbc_url' href='
http://www.birt-exchange.org/org/resources/bug-reporting/'>file
an Enhancement request</a>to have this added.
BirtRunn
Any update, any help for my issue?
mwilliams
Hi BirtRunn,
So, you need to change the alignment of an entire field depending upon data? Or just specific rows within a field need to be aligned differently if they meet a certain criteria? Let me know.
pricher
Hi BirtRunn,
If I understand correctly, you want to change the text alignment of a control dynamically. To do this, you can override the onCreate event of the control in script, and use the following syntax:
this.getStyle().textAlign = "Right";
The accepted values for textAlign are "Right", "Left" and "Center"
I have attached an example that overrides the onCreate event of CREDITLIMIT and changes the alignment based on the COUNTRY value.
Hope this helps!
P.
BirtRunn
First of all sorry for late reply Pricher and mwilliams.
Pricher, this is what I exactly wanted. I tested and its worked out. Great!!!
Unfortunately now I can?t use it as my requirement is changed where I don?t need this special feature. But it?s great to know this.
Can you let me know where I can find out all these script api's which can be used to control output of report..
like you used in sample..
this.getRowData().getColumnValue("COUNTY")
this.getStyle().textAlign = "Right";
Thanks again.