Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Object Content Breaking

Status
Not open for further replies.

bemular

Programmer
Nov 25, 2011
3
PH
After researching for hours, I couldn't get any answer online/google on this.

The report has a multiline Text Object (more like a Text Area), containing a static paragraph with 5 dynamically-supplied fields/formulas.

-----------------------------------------------------------
{@SHE_HE} has earned a total gross compensation of {@GROSS_IN_WORDS} ({GROSS_AMT}) for the period covered {START_DATE} to {END_DATE}.
-----------------------------------------------------------

The problem is, since the Text Object probably sees the monetary amount with commas or periods, it automatically does line breaks while following the justified paragraph alignment.

--------------------------------------------------------------
He/She has earned a total gross compensation of one hundred thirty-four
thousand seven hundred four dollars and thirty-seven cents (USD 134,
704.37) for the period covered July 29, 20XX to October 27, 20XX.
--------------------------------------------------------------

Is there a way for telling it that a specific field/formula being displayed cannot be broken like a sentence.
(ex. 123,456,789,000.99 should not be broken in any of the thousands separators or the decimal point despite Text Object being "can grow" or whatever.)
 
Is {GROSS_AMT} text or a number. I am using CR9 and number fields embedded in a text object do not break, the whole number shifts.

If {GROSS_AMT} is text that might be causing your break problem.

Ian
 
It's a formula with a number format.
By the way, I'm using CR2008.
 
Are you sure its a number format, in your example you have it showing as

USD 134,704.37

How is the USD added?

I think you should break this formula into two parts, one showing currency and the other the amount as a true number.

Ian
 
Sorry for the late reply.
Also, I may have misinterpreted something about the case.

GROSS_AMT is actually a "Number" Database Field. Its raw value is like 1234567.89

I have a certain Text Field in the report's Detail section, which contains the following:
{@SHE_HE} has earned a total gross compensation of {@GROSS_IN_WORDS} ({GROSS_AMT}) for the period covered {START_DATE} to {END_DATE}.

Right-clicking the {GROSS_AMT} part of the Text Field content will have the option to format the field. I used "Number" Custom Style, with a currency symbol "floating" and positioned at the beginning (USD-123).

The issue of line breaking occurs only when the GROSS_AMT happens to be at the rightmost part of the entire text, in which it obviously would not fit the entire formatted monetary value. I was expecting that the report to try to plot the entire number in the next line instead.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top