Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I have small issue:
I need to reduce the size of the label into two lines
means length of the label values.
Example: in my image i hve label name pharmacy h/w replacement it is in single line.
REQ: i need that in two lines: like: pharmacy h/w
replacement
Please refer the image .
Thanks in advance.
Suresh
Try this
try this...
=replace(field name,' ',chr(13)&' ')
Hi,
The best option for this scenario is use horizontal orientation.
Regards,
Jagan.
It is a little complex to break intelligently on spaces or hyphens, but here some code that you could incorporate into your load after you have loaded the table containing the label to split. Assuming the table is named Data and the field is called Label:
Set vBreak = 20; // maximum length
WrapLabel:
LOAD Label,
If(t1 = 0 And t2 = 0 And ln <= $(vBreak),
Label,
If(t1 = 0 And t2 = 0 And ln > $(vBreak) And ln <= $(vBreak) * 2,
Left(Label, $(vBreak)) & chr(10) & Mid(Label, $(vBreak) + 1, 999),
If(t1 = 0 And t2 = 0 And ln > $(vBreak) * 2,
Left(Label, $(vBreak)) & chr(10) & Mid(Label, $(vBreak) + 1, $(vBreak)*2 - 1) & chr(10) & Mid(Label, $(vBreak)*2, 999),
If(t1 > 0 And t2 <= t1,
Left(Label, t1) & chr(10) & Mid(Label, t1 + 1, 999),
If(t2 > t1,
Left(Label, t1) & chr(10) & Mid(Label, t1 + 1, t2 - t1 -1) & chr(10) & Mid(Label, t2 + 1, 999)
))))) As WrapLabel
;
LOAD *,
If((t1 > 0) And (ln - t1 > $(vBreak)), Index(Mid(st, t1 + 1, $(vBreak)), ' ', -1) + t1, 0) As t2
;
LOAD *,
If(ln > $(vBreak), Index(Left(st, $(vBreak)), ' ', -1), 0) As t1
;
LOAD *,
Len(Label) As ln,
Replace(Label, '-', ' ') As st
;
LOAD Distinct
Label
Resident Data;
This can remain as a separate table and you can use WrapLabel in place of Label as the chart dimension. Adapt the script to your table and field names. Set vBreak to a suitable break size.
EDIT - on further testing, found a bug with the fixed wrap which is now fixed.
nice jonathan..
hi settu ,
small changes to ur expression .got the olution wat i required.
=left(Account, findoneof(Account, ' ', ceil(substringcount(Account, ' ')/2))) & chr(13) & chr(10) & right(Account, len(Account) - findoneof(Account, ' ', ceil(substringcount(Account, ' ')/2)))
thanks
Suresh