Limiting text output using CFM

I have a news website in which I want to display about three
lines of each entry whiles the rest of the story is read on a
detail page. Can somebody help me out with the code that will
automatically cut off text display and give way to a 'more' link?
Thanks.

That part does not go into the query, but is put onto the
page and it is
what the enduser see's. What the code is saying is show 255
characters from
the left.......of what the query brings back. If you increase
the number 255
then of course it will bring back that much more info....if
you decrease it
will do the opposite.
"chrisdonkor" <[email protected]> wrote in
message
news:eoa6d6$h3r$[email protected]..
> Hello c_wigginton, thanks for your reply. However, I
have still not been
> able
> to get it to work. This is my <cfoutput> query
>
> <CFOUTPUT query="Comments" maxrows=10>
> <a
>
href="cad_cn_detail.cfm?tblNewsCatID=#tblNewsCatID&tblNewsID=#tblNewsID#"
> class="menu04">#cComment#</a>
> </CFOUTPUT>
>
> where in the above query do I place -
#left(qry.article,255)#
> Thanks for your help.
>

Similar Messages

  • 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.

  • Text output using string indicator from subVI to mainVI

    Hi,
    I think I asked similar question before, but since then my program got more complicated.
    Here is my issue.
    I have a program with nested loops to print out the stream of strings in subVI
    and it needs to be updated in a string indicator in mainVI.
    When I say "update", it needs to be updated as it comes out line by line, not by
    the block when the loop is finished.
    I was not successful doing this by both shift register or RefNum.
    Maybe I do not know the advance usage these two.
    So can someone show me how?
    I have attached simplified version of my labview program.
    Thank you in advance!!!
    Solved!
    Go to Solution.
    Attachments:
    MainSubStrIndicator.zip ‏12 KB

    Hi horanyee,
    use some standard shift registers to achieve your goal... They will keep the previous valu so you can ad the new line!
    Message Edited by GerdW on 09-11-2009 08:43 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    subVI.vi ‏8 KB

  • RTF OR Text Output

    Hi All,
    We are migrating from 11.5.10 to R12. We have check printing customize program. In this program we are priting text output using Concurrent progam which is based on Oracle report writer. Concurrent program output is Text.
    Now I want to migrate this to R12, I was searching everywhere to find sample program which generates TEXT output similar to RTF template provided by Oracle IBYDC_STD1.rtf.
    Please tell me how to proceed further.
    Thanks

    Not sure for a pre-printed stationary, you need the concurrent program output to be in Text format. Ideally, you can design you check in a RTF/PDF format. Additonally, you can look into following files.
    IBYDC_LSR.rtf
    PAYUSCHKWVXML_en.rtf
    APCHECKPYMTSUP.rtf
    Cheers,
    ND

  • How to print a text file using Java

    How can I print a text file using Java without converting the output to an image format. Is there anyway I can send the characters in the text file as it is for a print job? I did get a listing doing this ... but that converted the text to an image format before printing....
    THanks,.

    Hi I had to write a print api from scratch, and I did not convert the output to image. Go and read up on the following code. I know there is a Tutorial on Sun about the differant sections of the snippet.
    private void printReport()
         Frame tempFrame = new Frame(getName());
         PrintJob printerJob = Toolkit.getDefaultToolkit().getPrintJob(tempFrame, "Liesltext", null);
         Graphics g = printerJob.getGraphics();
                    //I wrote the method below for calculations
         printBasics(g);
         g.dispose();
         printerJob.end();
    }This alone wont print it you have to do all the calculations in the printBasics method. And as I said I wrote this from scratch and all I did was research first the tutorial and the white papers
    Ciao

  • Report VS Excel output using XML Publisher tool (DBMS_XMLGEN)

    Hi All,
    Currently I am working on report generation in MRP module with Excel output using XML Publisher tool.
    XML tool works based on query.
    I have developed PLSQL block by using DBMS_XMLGEN – database package, to generate XML output of query.
    My question is how we can put generated xml on above PLSQL block into OUT file (APPS).
    Because DBMS_OUTPUT.PUT_LINE( ) has limitation, it allow 255 character string only.
    But I do not know, Is FND_FILE.PUT_LINE (FND_FILE.OUTPUT,’’) allow for large data?
    If it does not allow what will be the other solution in oracle application to resolve above problem.
    Let me know any queries regarding to this problem.
    Thanks and Regards,
    Sai Krishna @cavaya.com

    Hi Prakash,
    Thanks for the reply. We did apply the one-off patch and got rid of the problem of not viewing 'Excel' output using XMLP.
    Now we are looking at a different perspective:
    Basically our client is looking for the following:
    1. Mathematical functions in the resulting XLS (like SUM, AVG etc..) ouput
    2. Use of macros if possible.
    And to do this i am looking out for a sample template that gives me output in excel format I have a TAR with Oracle for this purpose, but the TAR has so far been unsuccessful in providing us with any material in the direction.
    Our client remembers seeing this as a demo at the Oracle Conference this yr at San Fransisco, but does not have a sample to provide us. We are looking for such a sample.
    Thx,
    Nitin

  • Open Text output of a Report in Excel  - Bad format

    Hi All,
    We have a report in Oracle Apps 11i(11.5.10) with Text as output format. We would like to open the file in Excel format.
    We have done the recommended setups from the metalink note ID 316752.1.
    Output is generated in Excel, but the format is not proper. Column level data is not displayed on Cell wise in the Excel, instead all the output is
    dispalyed in single column in the Excel.
    Any pointers on how to format the output to align each column in the output to the individual cell in the Excel.
    Or else.. how to generate the output to Excel file?
    Regards,
    Ram

    user504044 wrote:
    Helios,
    Kind regards for the reply.
    I have surfed all the notes. My problem is.. I can open the text output in Excel. But the format is bad.
    Output is nor properly alinged to the cells in the Excel.
    And being the report is .RDF, any way we can do on the format?Hi Ram,
    1. Are you using XML publisher to get the excel output?
    2. If yes did you set the layout to excel when you run the concurrent request on the SRS screen?
    Thanks
    Shailendra
    >
    Regards,
    Ram

  • How can I change the background color in text box using RGB format

    Can some one tell me if Mac Pages (version 5.0) allows users to customize the background color of a text box using RGB color format?  It appears that the text color can be changed using RGB but background color is limited to a few standard colors.   Thanks

    They are just sample swatches, use the Color Picker to choose anything you want.
    Peter

  • Generating TEXT output from RTF template/reports

    Hi ,
    We have been working with XML Publisher for a long time now.. and we have come across some requirements such as
    1. Page break in TXT report output
    2. Page Headers after every 'X' lines in TEXT output.
    This was easily achieved with RTF template and PDF/HTML/RTF output, but not with TEXT output in eTEXT template.
    So we started looking into two approaches
    1. Generate TXT from PDF/RTF/HTML output(generated from RTF template), though it will addon to the time, but we are looking for this approach. We are looking for some JAVA api's which can help us to extract text from PDF/HTML/RTF while preserving the format.
    2. Pass the TXT generated by eTEXT template to our custom util , which will split the report in diff. pages.This will get complex as we recieve more and more reports.
    We have also tried hacking the RTF parser used in XML P so as to get a TXT output or using XSL-FO objects in eTEXT parser, but we could not get anything of our help.
    Does anyone have any pointers in this.
    regards
    Gaurav

    You can burst with eText and I have done it
    successfully.
    I don't believe pagebreaks are an option in eText and
    I don't think it makes sense either since your
    generating a flat-file and not a customer or internal
    facing document. Does that make sense?
    Also, if you would like you can use the
    BIPublisherIDE, this code can be converted pretty
    easily to handle jcp. There is a an oa framework
    version I have developed but I haven't posted on my
    blog yet. I plan on adding a bolt on for java
    concurrent programs soon. it's really pretty simple
    just haven't had the time.
    http://bipublisher.blogspot.com/2008/03/bi-publisher-b
    ipublisheride.html
    Ike Wiggins
    http://bipublisher.blogspot.com
    Thanks Ike for your reply.
    I agree with your points on TXT files, but in our case,the reports are generated in TXT format for the customer so we are looking for the above mentioned features.
    I have gone through BIP IDE and its a wonderful small utility which eases the task of BIP development.
    As I mentioned in my original post that we are currently processing the generated TXT report using a custom util. in JAVA to get the desired output in TXT again.
    I assume thats not what a JCP would do,so I am looking to explore that too.
    As I understand the process for report generation is
    1. Generate XSL from eTEXT template.
    2. Get the XML data from DB using XDO
    3. Apply XSL on XML to get the required template.
    If we are looking to achieve some customizations then we need to have the XSL generated with those customizations.
    In this case, where do we plug in the JCP to alter XSL or am I missing something.
    regards
    Gaurav

  • ID CC 9.2.1: Interactive PDF, text boxes use wrong font

    When filling out text boxes of an interactive PDF (created with InDesign CC 9.2.1) in Adobe Reader X, the font used is always Times Roman or such. Whatever I've tried so far, I fail to make the interactive text boxes use a specific font. Should be the same font that's used for the rest of the text on the page. During exporting the PDF, I've instructed InDesign to embed all font glyphs.
    Is there a way to get around this problem?
    Andreas

    You have to work on it after exporting to PDF in Acrobat Pro and change the font there.
    BUT: Don't choose exotiv fonts, use the normal standard form fonts, otherwise the file size will increase, because every font in the form must be embedded. Another problem is that older versions of Adobe Reader or Acrobat or some other possible PDF readers only support the standard form fonts, like Helvetica, Times, Courier in Bold, Regular, Italic, and Bold Italic. So it is better to submit to this limitations.

  • Executing a native process and getting the text output

    Hi,
    I have the following problem.
    When I execute a native DOS process (lets say a batch file), and
    expect some text output from this process I use the following code:
    String command = "test.bat";
    Process process = runtime.exec(command);
    BufferedReader rd = new BufferedReader(new InputStreamReader(process.getInputStream()));
    String s = new String();
    while((s = rd.readLine())!=null) {
         out.println(s + "<br/>" );
    The problem is that as long as rd.readLine() does not return null, the page does not display the result. When the process crash, sometimes nothing return.
    I would like to display the output as it comes, i.e. line by line.
    I have no clue on how to do that except writting the output in a text file, and reading the text file with a page that reload every x seconds.
    I do not beleive this is a good solution.
    Additionaly, I may have a huge output. It seems to make the process
    to hang. Is there a was to fix it.
    Could someone give me some hints.
    Regards,
    Arnaud.

    I am having the same problem...did you ever solve it?

  • Spool SQl data into text file using dynamic sql

    Hi,
    I am spooling output data into text file using command
    select 'select t.mxname,bo.lxtype,t.mxrev'||chr(10)||'from mx_1234567'||chr(10)||
    'where <condition>';
    here mxname varchar(128),lxtype(128),mxrev(128) all are of varchar type.I want the output in format
    e.g Part|1211121313|A
    but due to column width the output,I am getting is with spaces.
    "Part then blank spaces |1211121313 then blank spaces |A"
    how can I remove these spaces between columns.I used set space 0 but not working.
    Thanks in advance.
    Your help will be appreciated.

    Hi Frank,
    I have seen your reply for SET LINE SIZE function. But, I could not be able to understand it.
    I am facing similar kind of issue in my present project.
    I am trying spool more than 50 columns from a table into flat file. Because of more column lengths in few columns, i am getting space. There are so many columns with the same issue. I want to remove that space.so that, data can fit perfectly in one line in .txt file without any wrap text.
    Below is my sample query.sql. Please let me know the syntax. My mail id : [email protected]
    --Created : Sep 22,2008, Created By : Srinivasa Bojja
    --Export all Fulfillments
    --Scheduled daily after 1:00am and should complete before 3:30am
    WHENEVER SQLERROR EXIT SQL.SQLCODE
    SET LINESIZE 800
    SET WRAP OFF
    SET PAGESIZE 800
    SET FEEDBACK OFF
    SET HEADING ON
    SET ECHO OFF
    SET CONCAT OFF
    SET COLSEP '|'
    SET UNDERLINE OFF
    SPOOL C:\Fulfillment.txt;
    SELECT SRV.COMM_METHOD_CD AS Method,
    SRV.SR_NUM AS "Fulfillment Row_Id",
    CON.LAST_NAME AS "Filled By"
    SRV.SR_TITLE AS Notes,
    SRVXM.ATTRIB_04 AS "Form Description"
    FROM SIEBEL.S_SRV_REQ SRV,
    SIEBEL.S_SRV_REQ_XM SRVXM,
    SIEBEL.S_USER USR,
    SIEBEL.S_CONTACT CON
    WHERE SRV.ROW_ID = SRVXM.PAR_ROW_ID AND
    SRV.OWNER_EMP_ID = USR.ROW_ID AND
    CON.ROW_ID= SRV.CST_CON_ID;
    SPOOL OFF;
    EXIT;

  • How can I conditionally change text output?

    Trying to modify text output, inline, based on a True|False condition
    i.e.:
    "the condition is: <condition>" should become
    "the condition is: Yup" or "the condition is: Badboy"
    I'm trying to use some inline code.  for example: "{if ($condition) {"Yup"} else {"Nope"}}" but can't seem to get it to work.
    cls
    $condition=$true
    if ($condition) {"Yup"} else {"Nope"}  #this actually provides the proper output, but I can't seem to integrate it to the complete string output.
    #the following line does not provide the proper result. 
    "Test string " + ({if ($condition) {"Yup"} else {"Nope"}}) +"."

    Hi Murdan,
    In addition, add some explanations to the methods above, we could use the “dollar sign + round brackets” and the expression in the brackets in double-quoted strings, whatever is in
    the brackets should be evaluated first.
    For more detailed information, please check this article:
    PowerShell - Special Characters And Tokens:
    http://www.neolisk.com/techblog/powershell-specialcharactersandtokens
    For more detailed information about the format operator “-f”, please refer to this article:
    about_Operators:
    http://technet.microsoft.com/en-us/library/hh847732.aspx
    If you have any feedback on our support, please
    click here.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • Best way to implement a basic text output window

    Hello,
    I want to monitor the activity of an hardware devices which sends text, in some case, a lot and fairly fast. So far I send this to the standard output and this is fine.
    Now I need to support several devices concurrently so I need to create a very basic window which just display some read only text with a scroll bar (I must have only one instance of my app running on a system). As there are hundreds of ways to do that in Java, I would like some advice to make something which minimize latencies and resources consumption (e.g. using a JTextPane with a StyledDocument might not be optimal for this...)
    Sebastien

    As recommended, I used a JTextArea. With that I use the default document and "Piped" streams.
    I tested it with the little loop below:
            String text = "";
            PipedOutputStream pos=new PipedOutputStream();
            final int PIPE_BUFFER_SIZE=0x100000;
            dialog.monitorStream(new PipedInputStream(pos,PIPE_BUFFER_SIZE));
            long start=System.nanoTime();
            for (int i = 0; i < 0x100000; i++) {
                String zeroes="";
                for(int j=0;j<Integer.numberOfLeadingZeros(i);j++)
                    zeroes+='0';
                text = zeroes+Integer.toBinaryString(i) + "\n";
                pos.write(text.getBytes());//use JTextArea/PipedOutputStream
                //System.out.print(text);//use console
            long end=System.nanoTime();
            System.out.println("exectime: "+Long.toString((end-start)/1000000));With the (win32) console it took around 195 seconds on my laptop
    I got a similar timing with NetBean's output window (but I must say that it is quite good result if we take into account that it keeps all the data while win32 console keeps only the 300 last lines!)
    Using the JTextArea/PipedOutputStream, times fall down to 22 seconds !! (I made it to accept up to 8MB of data and to keep at least the last 4MB chunk of data)
    Ok, I will never put JTextArea performance in question...
    Thanks for your answers.
    Note for those who do similar things: the PIPE_BUFFER_SIZE is a key parameter for the speed of operations, the bigger the better. For example, when I double its size, the times fall down to 15 seconds !
    Still for those interested in that kind of stuff, the core of the monitoring thread:
        protected class StreamMonitor implements Runnable {
            //This will display correctly ony ANSI characters
            //"&#50504;&#45397;" is displayed as "??"
            public StreamMonitor() {
            public void run() {
                int totalCount=0;
                try {
                    byte[] buf=new byte[0x8000];
                    StringBuffer sb=new StringBuffer();
                    sb.ensureCapacity(0x10000);
                    int emptyCnt=0;
                    while (true) {
                        if (toMonitor.available()>0) {
                            emptyCnt=0;
                            int n = toMonitor.read(buf);
                            totalCount+=n;
                            for (int i = 0; i < n; i++) {
                                sb.append((char)buf);
    if(sb.length()>0x8000)
    int MAX_SIZE=0x0800000;
    if(totalCount>MAX_SIZE)
    doc.remove(0,(MAX_SIZE / 2));
    totalCount-=MAX_SIZE / 2;
    doc.insertString(doc.getLength(), sb.toString(), null);
    outputTextArea.setCaretPosition(doc.getLength());
    sb.setLength(0);
    else
    doc.insertString(doc.getLength(), sb.toString(), null);
    outputTextArea.setCaretPosition(doc.getLength());
    sb.setLength(0);
    emptyCnt++;
    if(emptyCnt<1000){
    Thread.yield();
    else{
    //if we execute this thread repeatedly for nothing,
    //make it sleep a while to reduce CPU load
    Thread.sleep(20);
    } catch (Exception ex) {
    Logger.getLogger(ATextScreenOutput.class.getName()).log(Level.SEVERE, null, ex);

  • Setting text output color

    Is there a way to change the color of text output through System.out.println()? I want to have some text be shown in bright white while the rest of the output is in its normal attribute. I considered using some kind of ANSI opcodes but that is not portable to other platforms!

    No.

Maybe you are looking for

  • Help for simple java question

    May i know how to set the image .jpg or gif into the label ? how to get the time in this format::Monday 12th Jan 2004 thanks

  • Actions not working- CS3

    I have my own purchased copy of Photoshop CS3 on a PowerMac G5 and it's been working fine. Now I can't get the actions to work, and I have 1,000 files to resize. I've reinstalled the program, but nothing has changed. Here's what I do: Through Bridge,

  • Boot Camp formatting the windows Partition -XP- I DIDNT! NOW GOT BIG PROBS!

    Well Hi everyone, here goes in public! *I didn't read the manual carefully enough* So, got that out the way, when the XP disc finishes instal and restarts i get the blank dos screen with: 'disk Error, press any key to restart' but my keyboard has bee

  • Adding Table Events

    I have assigned a Tcode to a maintainance view.. In this one field is a foreign key from another table.. So when i insert a new record which is not in the check table, then the error message is displayed as ' value 'SER' not there in ZVTRT_TEST (Chec

  • Error while posing in J2IUN

    Hi Friends, I am getting error whicle posting monthly utilization in tcode J2IUN. After putting all the values and leting all remaining amounts to be 0, when SAVE button activates, then on pressing it follwing error comes. Error : This function is no