Wrapping text output

Is there anyway in PL/SQL that I can force output to wrap to the next line? I'm working on a report that shows questionnaire questions and some of them are pretty long. My current setup truncates the question if it goes past 60 characters, anymore than that it the formatting of the report is messed up. What I'd like it to do is when 60 characters are reached, it should wrap to the next line like Word and even report builder does. Is this possible?
I have the following procedure to format the output:
PROCEDURE put ( string IN CHAR, pad IN CHAR := 'N'
     , pad_num IN NUMBER := 0 ) IS
cen_pad          number ;
string2           varchar2(255) ;
BEGIN
string2 := nvl(string,' ') ;
if pad in ('C','c') then
cen_pad := floor(( pad_num - length(string2) ) / 2) ;
for i in 1 .. cen_pad loop
string2 := ' '||string2 ;
end loop ;
string2 := rpad(string2,pad_num,' ') ;
elsif pad in ('R','r') then
string2 := rpad(string2,pad_num,' ') ;
elsif pad in ('L','l') then
string2 := lpad(string2,pad_num,' ') ;
elsif pad = 'N' then
null ;
end if ;
dbms_output.put(string2) ;
END ;
As well as this one to print a new line:
PROCEDURE putl(string2 in char) IS
BEGIN
dbms_output.put_line(string2);
END;
Is there some way I could modify these to make this happen or is there some other way to do it?
thanks,
Ian

This is what I use :-
create or replace procedure EIR.EIR_TXT_PRN(c_string in varchar2)
is
v_first boolean;
v_text varchar2(32000);
v_chars_to_print BINARY_INTEGER;
v_chars_printed BINARY_INTEGER;
v_prn_txt varchar2(254);
loop_counter BINARY_INTEGER;
begin
v_first := TRUE;
v_text := c_string;
v_chars_to_print := length(v_text);
v_chars_printed := 1;
loop_counter := 0;
while v_chars_to_print > 0 loop
v_prn_txt := substr(v_text, v_chars_printed, 1);
if ((v_prn_txt = chr(10)) OR loop_counter > 249) then
DBMS_OUTPUT.PUT_LINE(v_prn_txt);
loop_counter := 0;
else
DBMS_OUTPUT.PUT(v_prn_txt);
loop_counter := loop_counter + 1;
end if;
v_chars_printed := v_chars_printed + 1;
v_chars_to_print := v_chars_to_print - 1;
end loop;
DBMS_OUTPUT.PUT_LINE('');
end ;

Similar Messages

  • Xml publisher report using RTF in Excel is coming as wrap text?

    Hi,
    I am working on XML publisher report, I have converted standard report to xml publisher , to generate the report in excel.
    But the output is coming as Wrap text, is there a way to get the output directly without wrap ?
    Thanks
    Dev

    Hi Dev,
    You can try below ways
    1>change the setting in table properties to fit table cell as per contents.
    2>or create a table and inside that create one more inner table and add your fields.
    3>or Create .XLS layout it will come properly.
    Thanks

  • Need to wrap text in af:column

    Hi,
    i have a af:column with output text. Need to wrap the text in output text. Tried setting the NoWrap to false, but did not work. Below is the code. I really appreciate if someone could help me in fixing this issue.
    <af:table value="#{bindings.POC.collectionModel}"
    var="row"
    rows="#{bindings.POC.rangeSize}"
    emptyText="#{bindings.POC.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.POC.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.POC.collectionModel.selectedRow}"
    selectionListener="#{bindings.POC.collectionModel.makeCurrent}"
    rowSelection="single" id="t9"
    inlineStyle="width:100.0%; height:100%;text-align:left; vertical-align:top;">
    <af:column sortProperty="Comments" sortable="false"
    headerText="Description" id="c65"
    width="847"
    inlineStyle="text-align:left; vertical-align:top;"
    noWrap="false">
    <af:outputText value="#{row.bindings.Comments.inputValue}"
    shortDesc="#{bindings.POC.hints.Comments.tooltip}"
    id="it2" noWrap="false"/>
    </af:column>
    </af:table>
    Thanks

    Hi Frank,
    Following is the jsp code that i am using but not able to wrap the text in column:
    <af:table id="logTable"
    value="#{abc.listWorkBenchLog}"
    var="log"
    bandingInterval="1"
    banding="row"
    rows="5"
    inlineStyle="border: 1px solid Silver ;width:700px;height:100px;overflow:scroll;" >
    <af:column sortable="true" sortProperty="strDesc" width="700" noWrap="false" >
    <f:facet name="header">
    <af:outputText value="Description"/>
    </f:facet>
    <af:outputText value="#{log.strDesc}" />
    </af:column>
    </af:table>
    I tried removing noWrap however it places a horizontal scroll bar (which i dont want and hence implementing this wrap text functionality) in the table.
    please help,
    Manglesh

  • Wrap text options, are they really limited?

    I was curious if there was a way to dial in precise NONuniform wrapping options.
    I have a place holder box that I want the text to wrap around and give a 5pt space on all but the right side... I want that 20pts.
    In the wrap text options it's all uniform.

    You’ll have to edit the path to add 15 points to the right side. One simple way would be to copy it with a +15 point horizontal offset then merge the two paths with Pathfinder.

  • In ICal is there a way to see all of the text in all day events on the month view of the calendar.  Seems to wrap text only if there is a time on the event

    In ICal is there a way to see all of the text in all day events on the month view of the calendar?  Seems to wrap text only if there is a time on the event

    The paths won't agree on the two OSs so a simple XML import isn't likely to work.
    See Sync iPod/iPad/iPhone with two computers and, if needed, Make a split library portable. The techniques in the first link will work when moving the library between Windows and OS X as long as the library is "portable", but iTunes takes quite some time checking the database when the library is opened under a different OS.
    tt2

  • In the new Keynote how does one find the Wrap Inspector to wrap text around a photo??? Thanks

    In the new keynote, the help section refers to the Wrap Inspector.  How does one find that or how does one wrap text around a photo??   Thanks

    You can also use the shape tool to draw a shape roughly following the outline of the graphic you want to wrap text around, change the fill and stroke to "none", then paste your text within the shape. It's a few more steps, but it opens you up to many creative alternative layouts.

  • How Do I Wrap Text Like the iOS Camera App?

    Hello. I am in yearbook, and I have been challenged with designing the cover of the yearbook, and I have been having a few problems along the way. One of these problems is to wrap text. Specifically, I'm stuck on how I would wrap text like the iOS camera app on the bottom of the screen. The words seem like they are wrap around a 3D object to give it that effect, but I can't really tell. If anyone can help me, it would be greatly appreciated.

    JJMack wrote:
    There is a big difference between being a casual user than real work or development. I own a iPod its a great MP3 player and a device I can display my pictures on out of my pocket. I'll even Facetime my kids at time to see my grand kids or help fix something.  My wife has a mini iPad for quick internet access and quire music and uses her iPod to entertain our two year old grandson with games.   She uses a Canon 1D mark 4 and I a Cannon 1D mark II.  The only use the iPad and iPod cameras get is Facetime. No iOS apps are use to work on images  they have no value when you have Photoshop. The iPod is better for displaying image then the iPad mini it has a 3:2 aspect ratio display and travels better the the mini iPad which has a 4:3 aspect ratio display.  I also crop image for display on wall mounted HDTV. The iPad is better for casual internet access then the iPod. All our kids have iPhones and they all use computers either Mac or PC for work and internet access.  When you have a Unix or Windows why would you want to touch an iOS device for work or serious internet access.  Apple mobile devices are convenient for casual use and grand kids don't get that dirty finger painting on them as they do using real paint. Nothing of real value is maintained on an iOS device.
    Well...there's Photoshop Touch and Photoshop Mix as well as Lightroom Mobile. It could be argued that they're don't exactly mirror their desktop cousins, yes, but they weren't meant to be. They were meant as extensions to the desktop experience.  (e.g., Lightroom Mobile lets one work with the RAW images they have in their Lightroom desktop collections.)
    The more powerful Windows tablets can run Photoshop desktop (like Photoshop CC) too.
    @bluebocat: Are you looking for text with a perspective? Like it has a vanishing point? As if it was turned in a certain direction in 3D space?

  • JTextAreaCellRenderer to wrap text in multiple columns... any better way?

    I would like to use a basic JTextArea cell renderer to wrap the text in a JTable cell, like in this thread
    http://forum.java.sun.com/thread.jspa?threadID=664671&messageID=3893724
    Although the technique works, a disadvantage is that it cannot be used "as is" for multiple columns due to the setRowHeight/revalidate issue. One suggested workaround was to keep track of the maximum row height, as described here:
    http://www.javaspecialists.co.za/archive/newsletter.do?issue=106
    Both seem a bit rough. Are there any other options or more efficient techniques for automatically wrapping text in a JTable cell?

    Hello, did you search online? there are many tutorials like this one: http://www.photoshopessentials.com/photoshop-text/text-effects/text-wrap/
    You simply create a path, substract the parts you do not need, then click with the text tool inside.
    Note that it is not a dynamic text wrap, you need to change it if you move the objects around.

  • Outlook 2013 - wrap text group policy applied, not working with or without digital signature

    Hello,
    I'm adding group policies to apply on our new installations of Windows 8.1 with Office 2013. One of the settings being applied is enforcing plain text emails and wrapping text at a certain number of characters. Policies are being added using the Outlook
    2013 admx.
    When I check the options inside Outlook 2013 the group policy did apply successfully (File, Options, Mail, scroll down to Message Format) The option to "Automatically wrap text at character:" is set to 132 and not adjustable as it should be.
    In the group policy I have it set to wrap at 132 characters, but when I go to a client machine and send a digitally signed email, it wraps at the default 76 characters. This makes for very annoying short blocky emails and multi-line hyperlinks.
    If I do not digitally sign the email then the text doesn't wrap at all! (until it meets the end of the window). So under no circumstances is it wrapping at 132 where it's supposed to.
    Thanks,
    -Nick 

    Hi,
    What is your account type in Outlook? Exchange or others?
    Please also let me know the email format that you are sending, Plain Text, HTML or Rich Text Format.
    You can try sending the same emails in Outlook Safe Mode:
    Press Win + R and type “outlook.exe /safe” in the blank box, then press Enter.
    If there’s no problem in Safe Mode, disable the suspicious add-ins to verify which add-ins caused this issue.
    Thanks,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • How to wrap text around a table

    I'm new to Pages. The first thing I tried to do was play with tables, because they are the biggest headache in Microsoft Word. However, I ran into a problem right away--I cannot figure out how to wrap text tightly around a table so that the table is surrounded by text on all four sides.
    Does anyone know how to do this? Seems very basic. There is even a button that shows what I want (Text Wrap drop-down --> Around), but when I click on it, nothing happens.

    Peter,
    I can recreate the appearance with five hard returns after the first paragraph, or instead, changing the After Paragraph spacing to 116 pt. Did this with Baskerville Regular 12 pt with line spacing set at 1. Same Arrange settings as shown by OP.

  • Webforms - Wrap Text/Word Wrap for Column Headings

    I have some member aliases that are set as my webform's column headings, but they are fairly long. Setting the column width to a custom value that fits most of the text in the heading makes the form very wide and ugly to work with. I don't see any option to Wrap Text or use Word Wrap in the column headings. Is there any way to do this?
    Thanks!

    Hi,
    I am not aware of any option which allows you to wrap the text, it may be possible customizing the [CSS |http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_hp_admin/ch12s03.html] though to be honest I am not even sure about that and even if it was possible it would apply to all apps.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Cell Wrap Text

    Hi,
    Does the MS Word's cell Options > Wrap text really work? I have XMLP 5.63, Word 2003, and I'm trying to restrict the invoice line description to only 1 line, but it does not seem to work.
    Does anybody have any ideas?
    Thx
    Jo

    Hi Jo,
    You could try this: <?xdofx:substr(DESCRIPTION,1,30)?> where DESCRIPTION is the name of the XML tag of the invoice line description.
    It will show the first 30 characters.
    Succes.
    Norman

  • Wrap text when Viewning PDF file ?

    Hi all,
    is there a way that we can wrap text the PDF file when viewing ?
    the font is quite small even with landscape viewing, and if zoom in, i still cant see the text as they are quite small,
    do you know a way/ a software that we can convert the PDF for better viewing on iphone ?
    thanks alot

    If you use Adobe Reader 9, you have to enable "Enable search highlights  from external highlight server" in "Preferences|Search" .
    For Adobe Reader X read this:
    http://forums.adobe.com/message/3286586

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Creating a text output using XML Publisher

    Hi All,
    Recently i created a  report for my client using XMl Publisher. The Data Definition was XML and the template type was RTF and i got the output in a PDF format. All was going smoothly until the client decided at the last moment that they wanted to print this in a dot matrix printer!
    I've read some articles on XSL- Text layout templates. But i can't get my head around it (I'm Functio-Technical as opposed to Techno-Functional )
    How do i convert my RTF template to give me a text output?
    Miranga

    From what I know, you will have to create another template based on "XSL" layout or eText layout (both of them require different coding methods). The RTF can not create text outputs even in 11g. This is based on my experience so far. You can create RTF output (available by default) based on the current layout that you use for PDF and see if it can be printed in a dot matrix printer though.

Maybe you are looking for

  • Mountain Lion will not load on my mac pro with 10.7.4.

    I purchased and tried to download Mountain Lion to my mac pro and it will not down load. Once I press download it does nothing. I have already been billed for it. My mac pro notebook is less than a year old opperating 10.7.4 Lion. Any ideas?

  • Error in Export User

    Hi Folks, I am using Oracle 9.2.0.6. when i am trying to export a user following errors are occuring. Please advice. User to be exported: (RETURN to quit) > . exporting pre-schema procedural objects and actions . exporting foreign function library na

  • Photoshop Elements 12 License agreement

    I'm trying to decide wether to get the App Store or «full» version of Photoshop Elements. With the App Store version I can install on all my macs, which is nice. Do any of you know if I can do the same with the full version? Regards G. Helland

  • Can't change file ownership.

    To be careful, I did a new install of Lion on a freshly formatted disk (by installing SL first, of course). One of the first things I tried was Aperture. My Aperture Library is on a separate (SS) disk. When I tried to launch Aperture, it knew where t

  • Insert an element in a HTMLDocument

    I have a HTMLDocument, and I should want insert, for instance, a <b> element anywhere. How can I do that ? Thanks in advance for your help.