Focal Point
[CASE-OPENED] avoid line breaks in text field

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2397069126

July 06, 2012, 08:58 AM
ReddyP
[CASE-OPENED] avoid line breaks in text field
I have a comments text field that can have up to 2gb data.
I need to print the comments text field like a paragraph.
Issue is when I print the text field, it breaks in to multiple lines with out being a one continuous big line.
From what I understand from the documentation
(from the documentation:Text fields can be used to store large amounts of data and display it with line
breaks.), text fields do display linebreaks in between the text.
Is there a way to avoid line breaks in the text field?
I do not want to split in to multiple fields and then display them because for 2GB worth of data, it will be too many fields to split.

Thank you.

This message has been edited. Last edited by: Kerry,


7.7.01,windows2008 R2
July 07, 2012, 11:57 AM
George Patton
quote:
I need to print the comments text field like a paragraph.
Issue is when I print the text field, it breaks in to multiple lines with out being a one continuous big line.

I don't understand. The second sentence seems to be exactly what you are looking for in the first sentence... And 2GB in one field is definitely a stretch. Others here, who are much smarter than me, will tell you precisely what the limits are. I suspect you are going to have to READ your text, word by word, from a file, and then re-concatenate the text in your report.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
July 09, 2012, 09:19 AM
ReddyP
SET PAGE = NOPAGE
DEFINE FILE CAR
SAMPLE_TEXT/TX50= 'This is a test for Text field. Lines get broken in the middle of the page.  They are not continuous.  Any alternative for this?';
END
TABLE FILE CAR
BY COUNTRY NOPRINT SUBFOOT
"<SAMPLE_TEXT"
ON TABLE PCHOLD FORMAT DOC
END
-EXIT

Please run the above code. You would see what I mean. The sentence should have run through the entire length of the page instead of breaking in the middle.
I understand that it is because I defined the text field as TX50. Even I define it to max length of 256 characters, still the lines would break after 256 characters. Our users enter long text. So, TX256 is also not an option for me.

Thank you


7.7.01,windows2008 R2
July 09, 2012, 12:24 PM
Alan B
The only way I know is to create the field as an A32000, Actual and Usage.

Bu that is the read limit, so I do not think that you will ever display more than just under 32k.


Alan.
WF 7.705/8.007
July 09, 2012, 12:37 PM
ReddyP
Thanks Alan. That is exactly what I am doing currently. But, I was checking to see if there are any other alternatives.
I opened a case with IBI on this.
Wouldn't it be nice to be able to print the text field the way it is stored in the database?

Thanks.


7.7.01,windows2008 R2
July 09, 2012, 01:42 PM
Dan Satchell
TX fields are designed for displaying large amounts of text in paragraph form. The length you specify for the field determines the width of the paragraph. If you want Word to determine the width of the paragraph, then use an alpha field and let Word wrap the text where it wants. If the data is stored as TX, you can either increase the size (width) of the TX field or convert it to an alpha field in a DEFINE or COMPUTE:

DEFINE FILE CAR
 SAMPLE_TEXT1/TX50 = 'This is a test for Text field. Lines get broken in the middle of the page.  They are not continuous.  Any alternative for this?';
 SAMPLE_TEXT2/TX65 = SAMPLE_TEXT1 ;
 ALPHA_TEXT/A32000 = SAMPLE_TEXT1 ;
END
-*
TABLE FILE CAR
 BY COUNTRY NOPRINT SUBFOOT
  "<SAMPLE_TEXT1"
  " "
  "<SAMPLE_TEXT2"
  " "
  "<ALPHA_TEXT"
 WHERE RECORDLIMIT EQ 1 ;
 ON TABLE SET PAGE NOPAGE
 ON TABLE PCHOLD FORMAT DOC
END



WebFOCUS 7.7.05