i have a column whose data doesnot contain any spaces (for example like com/fmrco/eit/common/equityrefdatasvc/ibatis/query/AASectorSecurityLookup.xml.) i want to wrap this column width to WRAP=1.000000. however, when the data doesnot contain any spaces, it doesnot seem to wrap the text.
any help is greatly appreciated.
KeerthiThis message has been edited. Last edited by: Kerry,
Windows, All Outputs
From our technicals: WRAP will not work without a space. You may want to open a case with Customer Support Services to find a technique to break the text up into something that would work. The phone number is 1-800-736-6130, or access online at InfoResponse.
Focal Point Moderator
Information Builders, Inc.
If your output format were PDF, WRAP would wrap the text, even if there are no spaces. For HTML output, you might be able to use several functions to break up the text into paragraphs. This approach assumes you have a common character in the text (such as the slash in your example) that can be used to split the text. If you don't care about a few extra spaces in the output, you could simply use function STRREP to replace every slash with a slash plus a space ('/ '). WRAP could then use the spaces to wrap the text into appropriate lengths.
If you don't want extra spaces in the output, then a little more work is required. The sample code below (which assumes an incoming text length of 40) essentially replaces all slashes with a slash plus a space, then uses function PARAG to delimit the text into 20 character lengths (using a delimiter like '~' that should never be found in the text), then uses STRREP again to remove the remaining extra spaces, and finally replaces the delimiters (~) with spaces. WRAP can then use the spaces to wrap the text. Obviously, you need to play with the PARAG length setting (20 characters here) and the WRAP setting (1.0 inch here) so that they produce essentially equal lengths.
DEFINE FILE xxx TEXT_SPACE/A60V = STRREP(40,TEXT_IN,1,'/',2,'/ ',60,'A60V'); -* replace slashes with slash plus space TEXT_LENGTH/I5 = ARGLEN(40,TEXT_SPACE,'I5'); -* determine actual length of text for next step TEXT_PARAG/A60V = PARAG(TEXT_LENGTH,TEXT_SPACE,'~',20,'A60V'); -* split text into approximately equal 20 char lengths with delimiter (~) TEXT_SLASH/A60V = STRREP(60,TEXT_PARAG,2,'/ ',1,'/',60,'A60V'); -* replace remaining '/ ' with slash only (remove spaces) TEXT_OUT/A60V = STRREP(60,TEXT_STRIP,2,'/~',2,'/ ',60,'A60V'); -* replace ~ delimiters with space so WRAP can use them to wrap text END -* TABLE FILE xxx PRINT TEXT_IN TEXT_OUT ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=REPORT, COLUMN=TEXT_IN, WRAP=1.0, $ TYPE=REPORT, COLUMN=TEXT_OUT, WRAP=1.0, $ ENDSTYLE ON TABLE PCHOLD FORMAT HTML END
|Powered by Social Strata|