System clipboard pasting multi lines

I have a small java snippet that will copy text to the system clipboard. what i need to know is how to make it copy more than one single string to the system clipboard? Any ideas???

I'm confused. You know how to copy one String to the clipboard but you don't know how to copy two Strings to the clipboard.

Similar Messages

  • Paste Image to System Clipboard

    Hello all...I can't paste an Image to the system clipboard and was wondering if you could help me. Noticed there was some help on this topic with JDK 1.4.1, however I'm using JDK 1.3.1.
    I following code was copied from Sun at http://developer.java.sun.com/developer/Books/GJ21AWT/ch20.pdf
    but I cant get it to work.
    <code>
    //implement the class like this
    ImageSelection is = new ImageSelection(Constants.DRAWINGSLATE.currentImage.pBitmap[dList.ptr].getImage());
    toolkit.getSystemClipboard().setContents(is, null);
    class ImageSelection implements ClipboardOwner, Transferable
    public static DataFlavor ImageFlavor;
    public static DataFlavor ImageArrayFlavor;
    private DataFlavor[] flavors = {ImageFlavor, ImageArrayFlavor};
    private java.awt.Image image;
    private int width, height;
    static
    try
    ImageFlavor = new DataFlavor(Class.forName("java.awt.Image"),"AWT Image");
    ImageArrayFlavor = new DataFlavor("image/gif", "GIF Image");
    catch(Exception e)
    public ImageSelection(Image image)
    this.image = image;
    public ImageSelection(Image image, int width, int height)
    this.image = image;
    this.width = width;
    this.height = height;
    public synchronized DataFlavor[] getTransferDataFlavors()
    return flavors;
    public boolean isDataFlavorSupported(DataFlavor flavor)
    return flavor.equals(ImageFlavor) || flavor.equals(ImageArrayFlavor);
    public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException
    if (flavor.equals(ImageFlavor))
    return image;
    if (flavor.equals(ImageArrayFlavor))
    return imageToArray();
    else
    throw new UnsupportedFlavorException(flavor);
    public void lostOwnership(Clipboard c, Transferable t)
    private int[] imageToArray()
    int[] pixels = new int[width*height];
    PixelGrabber pg = new PixelGrabber(image, 0, 0, width, height, pixels, 0 , width);
    try
    pg.grabPixels();
    catch(InterruptedException e)
    e.printStackTrace();
    return pixels;
    </code>
    I get this exception
    Couldn't write data flavor java.awt.datatransfer.DataFlavor[representationclass=java.awt.Image;mimetype=application/x-java-serialized-object] to clipboard:
    java.io.IOException: Transferable's flavor data is of unexpected class com.apple.mrj.internal.awt.graphics.VImage
    Thanks for any help.

    I was trying to use ur code with slight modification
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.io.*;
    import java.util.*;
    public class Test {
    public static void main (String[] parameters) {
              new Test ().test ();
    private void test () {
    Toolkit.getDefaultToolkit().getSystemClipboard ().setContents (          new mageTransferable ("test.jpg"),
         new ClipboardOwner () {
         public void lostOwnership (                                             Clipboard clipboard,
                             Transferable contents) {}
    private class ImageTransferable implements Transferable {
    private String fileName;
    public ImageTransferable (String fileName) {
    System.out.println(" Checking for the File now");
    if (! new File(fileName).exists ()) {
    throw new IllegalArgumentException ("Can't find image");
    System.out.println(" got the file");
    this.fileName = fileName;
    System.out.println(" returning from constructor");
    public Object getTransferData (DataFlavor flavor) throws UnsupportedFlavorException {
    System.out.println("trying to get the data to be transfered");
    if (! isDataFlavorSupported (flavor)) {
    throw new UnsupportedFlavorException (flavor);
    System.out.println("This is a supported flavor");
    return (Image)Toolkit.getDefaultToolkit().createImage (fileName);
    //               System.out.println(
    public boolean isDataFlavorSupported (DataFlavor flavor) {
    System.out.println("trying to check whether the flavour is supported one");
    DataFlavor[] df= this.getTransferDataFlavors();
    System.out.println(" data flavors " + df);
    boolean result = in(flavor, df);
    return result;
    public DataFlavor[] getTransferDataFlavors () {
    //     "image/x-java-image; class=java.awt.Image"
    DataFlavor df=null;
    System.out.println("trying to get the data flavours");
    df =new DataFlavor("application/x-java-serialized-object; class=java.awt.Image","Image");
    //new DataFlavor("image/x-java-image;class=java.awt.Image","Image");
    System.out.println(" Just going to return & DF found was"+ df);
    DataFlavor[] df2 = new DataFlavor[]{df,DataFlavor.plainTextFlavor,DataFlavor.stringFlavor,DataFlavor.javaFileListFlavor };
    System.out.println(df2.length);
    System.out.println(df2[0]);
    return df2;
    private boolean in (DataFlavor flavor, DataFlavor[] flavors) {
    System.out.println("Im in in");
    int f = 0;
    while ((f < flavors.length) && ! flavor.equals (flavors[f])) {
         f ++;
         System.out.println("Im in in's loop");
    return f < flavors.length;
    But this throws the following exception:
    Exception in thread "main" java.lang.ClassCastException: sun.awt.windows.WImage
    at sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer
    .java:346)
    at sun.awt.DataTransferer.translateTransferable(DataTransferer.java:245)
    at sun.awt.windows.WClipboard.setContents(WClipboard.java:69)
    at Test.test(Test.java:13)
    at Test.main(Test.java:8)
    Is the dataflavour purely dependent on OS. What can be done to overcome this problem

  • Paste from System Clipboard

    Hi,
    I've been looking all over on how to copy and paste to/from the system clipboard. I've used the tutorial classes at http://java.sun.com/developer/technicalArticles/releases/data/ explaining new data transfer capabilities in java, and it seems that I can copy and paste to/from a java application but I can't seem to paste images from the system clipboard in applications such as Thunderbird and OpenOffice.
    I'm not sure what the problem or solution is, but if anyone has any ideas that would be great. I was thinking it may be that in the tutorial it is copying the content of a JComponent to the system clipboard but I'm pretty sure that is not it.
    Any help is appreciated.
    thanks

    import java.awt.*;
    import java.awt.datatransfer.*;
    public class ClipboardImage
          *  Retrieve an image from the system clipboard.
          *  @return     the image from the clipboard or null if no image is found
         public static Image read()
              Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents( null );
            try
                if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor))
                    Image image = (Image)t.getTransferData(DataFlavor.imageFlavor);
                    return image;
            catch (Exception e) {}
            return null;
          *  Place an image on the system clipboard.
          *  @param  image - the image to be added to the system clipboard
         public static void write(Image image)
            if (image == null)
                throw new IllegalArgumentException ("Image can't be null");
              ImageTransferable transferable = new ImageTransferable( image );
            Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
        static class ImageTransferable implements Transferable
            private Image image;
            public ImageTransferable (Image image)
                this.image = image;
            public Object getTransferData(DataFlavor flavor)
                 throws UnsupportedFlavorException
                if (isDataFlavorSupported(flavor))
                     return image;
                else
                    throw new UnsupportedFlavorException(flavor);
            public boolean isDataFlavorSupported (DataFlavor flavor)
                  return flavor == DataFlavor.imageFlavor;
            public DataFlavor[] getTransferDataFlavors ()
                return new DataFlavor[] { DataFlavor.imageFlavor };
         public static void main(String[] args)
              Image image = Toolkit.getDefaultToolkit ().createImage("???.jpg");
              ClipboardImage.write( image );
              javax.swing.ImageIcon icon = new javax.swing.ImageIcon( ClipboardImage.read() );
              javax.swing.JLabel label = new javax.swing.JLabel( icon );
              javax.swing.JFrame frame = new javax.swing.JFrame();
              frame.setDefaultCloseOperation( javax.swing.JFrame.EXIT_ON_CLOSE );
              frame.getContentPane().add( label );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • Programatically copy to  System Clipboard

    I'm trying to programatically copy a value from my applet to the system clipboard without much luck. My jars have all been signed and I am able to ctrl-c and ctrl-v to/from the applet/system clipboard. What I need to be able to do is invoke this behaviour from a popup menu. Below is a code snippet:
    public void actionPerformed(ActionEvent event)
                   Object source  = event.getSource();
                   String strValue = source.toString();
                   StringSelection strSelection = new StringSelection(strValue);
                   Toolkit.getDefaultToolkit().getSystemClipboard().setContents( strSelection , strSelection );
                    // at this point I have verified that 't' does indeed contain my item.
                   Transferable t =Toolkit.getDefaultToolkit().getSystemClipboard().getContents(strSelection );
    }When I try to paste into, say notepad, there does not appear to be anything in the clipboard.
    Any idea as to what I'm doing wrong? I'm using 1.5 plugin (but want to move down to 1.4)
    Thanks,
    -Craig Green

    I guess you didn't sign it right or called your method from untrusted (unsigned) code.
    for signing:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post
    for a full trace:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)

  • Copying to the system clipboard

    Hi...
    I am trying to copy the contents of a JPanel to the system clipboard so I can paste it into an app like MS Word. The JPanel just has some lines and dots on it that I've drawn with draw and fillOval.
    I am VERY new to Java so the only way I could figure out to do this was to save the contents of the panel as a .jpg and then wrap it up in a class I created that implements the transferrable interface. This works....and I can paste it into Word and it looks fine on the screen. But when I print it.....it looks very grainy. So I'd like to be able to copy this panel to the clipboard in some other way besides saving it as an image first.
    Is there any other direct way to copy components like a panel with shapes drawn on it to the system clipboard that anyone knows of?
    Thanks in advance!
    Julie

    Thanks for the suggestion. I tried it...but it still looks like crap when I print it.
    I am drawing directly on a Graphics2D object (the exact size I want), then I put into a BufferedImage. Then I save the BufferedImage as a .png, open it back up and copy it to the system clipboard.
    It is just the image quality. Is there a way to manipulate the DPI?
    Thanks again,
    Julie

  • System Clipboard with KDE

    Just wondering if anyone else has encountered this.
    I have a bunch of users using an application mostly on either windows, Linux with Gnome and Linux with KDE. Sometimes, and only on KDE, pasting stuff from the System clipboard causes the application to totally freese up (no CPU time is used, but the application becomes totally unresponsive). I have asked the KDE users to switch over to Gnome, but would really like to know the underlying reason for the problem.

    toxic, from what I understand from t-dawg's questions is that he wants to emulate what you can do in gvim, but with vim instead.
    In gvim, I can click the mouse button; hold; drag downwards and then gvim will start scrolling downwards, whilst highlighting the passing lines. This is how you highlight large amounts of text (greater than what can fit in a single screen at a time) with a mouse.
    However, terminals are slightly dumber. Whilst you can highlight areas of text, that's a console function and not something that vim itself is monitoring. Therefore, you can't achieve the same effect with the mouse in vim as you can in gvim.
    Of course, vim is perfectly capable of selecting more text than can fit in a single screen. It has a visual mode. Press v and then move down with your cursor keys, et volia - highlighted text.
    Now when it comes to shifting this to X11's clipboard, I've never tried (hence the link I gave for possible help). I'm sure it can be done.

  • Printing all text in a multi-line text field??  Can it be done?

    I was wondering if there is a way to print out a multi-line field and have all text entered print as well.  Currently, anytime someone enters more information in a multi-line text field on our form than is set to show without scrolling, when a PDF is created for printing from the results page, only the text that fits within the specified size prints.  You can scroll within the PDF and read it all, but I can't seem to figure out how to get all of the text to show and have that field resize accordingly on the printed copy.
    Is there a way?  Thanks.

    Is there an easy way to determine the character count that is visible in a given multi-line text field when designing the form, so if I want to allow 500 characters, the text box I create is large enough for 500 characters?  Obviously I can just do a trial and error process using a cut and paste of 500 characters and testing it, but is there an easier way?

  • How to create a dynamic multi-line function in SQL Server

    I am attempting to create a Multi-Line Function in SQL Server that accepts a dynamic WHERE clause as a parameter. I need this so that the function can be as versatile as possible for the filter that needs to be applied. I am unfortunately getting an error
    upon creation of the function.  I don't know how to solve the problem. Can someone advise me?
    SQL:
    SET
    ANSI_NULLSON
    GO
    SET
    QUOTED_IDENTIFIERON
    GO
    -- =============================================
    -- Author:
    -- Create date: 2/3/2014
    -- Description: This multiline function will accept a generic WHERE Clause and apply it to the query for return.
    -- =============================================
    CREATE
    FUNCTIONTESTMULTILINEFUNCTION
    @WHEREvarchar(1024)
    ,@CHANGEDDATEasdatetime
    RETURNS
    @TESTTABLE
    TABLE
    IDint
    ,REVint
    AS
    BEGIN
    Declare@SQLSTRINGvarchar(4096)
    SET@SQLSTRING=''
    SET@SQLSTRING=@SQLSTRING+'SELECT
    REVS.ID, REVS.Revision
    FROM
    Select distinct result.ID, Max(Rev) as ''''Revision''''
    FROM
    Select * from dbo.BugsAll
    where
    [Changed Date] < @CHANGEDDATE
    ) result
    GROUP BY result.ID
    ) REVS
    join dbo.BugsAll BA on (BA.ID=REVS.ID AND BA.REV=REVS.revision)'
    IF
    (@WHEREisnotnullOR@WHERE<>'')
    BEGIN
    SET@SQLSTRING=@SQLSTRING+'
    WHERE '+@WHERE;
    END
    INSERT@TESTTABLE
    EXEC
    (@SQLSTRING)
    RETURN
    END
    GO
    ERROR:
    Msg 443, Level 16, State 14, Procedure TESTMULTILINEFUNCTION, Line 44
    Invalid use of a side-effecting operator 'INSERT EXEC' within a function.
    Senior Test Lead -- Microsoft

    >> Unfortunately I really need to form a dynamic query in a table valued function on the SQL SERVER. I have another tabled valued function that needs something returned as a table in order to further join the data. I am not allowed to use Stored
    Procedures in that function. <<
    You do know that real SQL programmers hate the proprietary nightmare of tabled valued functions?  This is how you procedural programmers avoid learning set-oriented declarative and functional programming. 
    Your mindset wants to write to a scratch tape or disk file (aka “tabled valued function result table”) just like you did BASIC, FORTRAN or COBOL. QL programmers do not have to materialize their data. We can use VIEW or a drive table as well as a base table. 
    >> Plus, there are occasions where I don't want to pass in a field [sic: columns are not fields] parameter or need to change a parameter list such that I don't wish the table function to filter by a particular field [sic] or other setting. <<
    What you want is a magical “Automobiles, Squids and Lady Gaga” function. An SQL programmer might write a complex VIEW then do simpler SELECTs off it. 
    >> My application pushes the WHERE clause from EXCEL to SQL to do the hard work as EXCEL is not the application in which I want to process the SQL statement and pass it via ODBC. I cannot run macros in Excel on the web.<< 
    This is a crazy language system. Usually we fetch data in SQL and then pass it to a math package, report writer, etc. We never keep logic (aka WHERE clauses) outside the database. 
    >> I am bummed about the fact that this feature doesn't work. It will up my server management costs to maintain unique tabular based functions based on WHERE clause query <<
    So stop writing those “tabular based functions”, change your mindset and start learning SQL and do it right. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Problems copying from PJC to system clipboard

    I am working on a PJC to allow for editing of large text fields (> 64K). I have most of the functionality working fine. However, I am having a problem using cut, copy, and paste.
    Some details, the PJC extends VBean and includes as JTextArea. Our users want a right click menu to provide functionality for cutting, copying, pasting, and spell checking. I was able to get the spell check working using JSpell. I am not able to get the menu entries for cut, copy, and paste to work. I construct a JPopMenu with the appropriate items. When the menu is activated, if the user selects cut, the actionPerformed method executed the cut method of the JTextArea. This does cut the text from the item, however it is not added to the clipboard for use in other items, except those that have the same implementation class of the original item. If the user uses the keyboard (CTRL-X, CTRL-C, or CTRL-V) the selected data is copied to the system clipboard
    Here is the method I used to create the menu items:
      private JMenuItem makeMenuItem(String label, char acceleratorKey)
        JMenuItem item = new JMenuItem(label);
        item.addActionListener(this);
        item.setMnemonic(acceleratorKey);
        item.addKeyListener(this);
        printDebugMessage("Horizontal text alignment = " + item.getHorizontalAlignment());
        item.setHorizontalAlignment(SwingConstants.LEFT);
        printDebugMessage("Horizontal text alignment = " + item.getHorizontalAlignment());
        return item;
      }Here is the actionPerformed method:
      public void actionPerformed(ActionEvent ae)
        String selection = ae.getActionCommand();
        if (selection.equals("Cut"))
          printDebugMessage("Cut selected");
          text.cut();
        else if (selection.equals("Copy"))
          printDebugMessage("Copy selected");
          text.copy();
        else if (selection.equals("Paste"))
          printDebugMessage("Paste selected");
          text.paste();
        else if (selection.equals("Spell Check"))
          printDebugMessage("Spell Check selected");
          doSpellCheck();
      }I read that jar files needed to be signed to interact with the desktop, but when I signed the jar file the results were the same.
    Platform
    10g AS on Solaris 10.1.2.2
    Windows XP (SP2)
    IE7
    Sun plugin 1.5.0_11 (problem also occurs with 1.4.2_06)
    Any insights would be helpful.
    Thanks

    will that create a problem?Try it and see.

  • Why is the multi-line option not allowed in my text fields? Acrobat X Pro

    I have created a form in which I wish to make mulit-line fields. To create the original fields, I used auto field detect, then copied and pasted them to repeat in a chart. None of these fields allow me to select the multi-line and scroll text options I need (including the first auto-detected ones). When I draw a new field, it allows me to apply multi-line and scroll text. Any idea whay these first fields arent allowing the same? thanks!

    ah! found it - the option for Comb of Characters was checked, thus greying out the other options. Thanks anyway!

  • Signed Applet JTextField copy to system clipboard

    Hi all,
    We have a signed and deployed our JAR file that contains our applet following the instructions listed at:
    http://java.sun.com/products/plugin/1.3/docs/rsa_signing.html
    We used Thwate as our CA. All seemed good.
    However any JTextFields that are in our applet cannot access the system clip board. Looking at the source for JTextComponent it should have access to the system clipboard if the securitymanager allows it.
    The strange thing is that if I call getToolkit().getSystemClipboard() from our applets I can access the clipboard and copy to the system clipboard. Even the code in JTextComponent that checks for system clipboard access (canAccessSystemClipboard) works fine when pasted into the applet.
    Why cant a JTextField copy to the clipboard? Has anyone else come across this?

    Juste an idea.... Is your JTextField belonging to the javax.swing.... packages ?
    Or did you compile using some com.ms , ibm.... sun... package ? This could lead to some different implementations.

  • Multi line values in mail forms to send emails

    Hi All,
    Ours is CRM 2007 application, as part of new capability adding to the system, we need to send email to customer with few details once service tickets saved in the system. we decided to use mail forms to create the template and send email to the customer with details. as part of this we need to send multi line values as well in the mail form - email as shown below. example field here is for working hours of the customer office.
    Saturday - Sunday 10am - 4pm
    Saturday - Sunday 10am - 4pm
    (excluding public holidays)
    Can some body tell me how to send the multiline values using mail forms - emails to customers. right now we receive the last line. I dont see any help in mail form documetation as well on this.
    I appreciate any help in this if you already have some solution.
    Regards,
    Srinivas

    Hi,
    Are you using below any FM to send mail ?
    1. CRM_IM_EMAIL_CREATE_SEND_40 2. CRM_IM_EMAIL_CREATE_SEND_51
    if so, then inside this FM there will be call to BADI CRM_IM_ADD_DATA_BADI . This badi will get the data for custom/additional attribute values. Basically it will get one value ( last value ).
    What u might need to do is after this badi call u need to loop ur values and set it . For doing that u might need to make this FM tocustomer name space or look for implicit enhancements.
    We have done similarly for sending mail duringcampaign execution. That was done in different place.
    hope it might help you to analyse more.
    Regards
    Sandeep

  • Multi line custom field badly saved to database

    Hello community,
    we're fighting currently against a strange issue.
    All projects has some multi line custom fields to fill every week for project status.
    During this exercise, some of the comments seems not well saved to database.
    While coming back to the PDP, we are seeing a strange behavior :
    Starting from that, I tried to look in the database and the saved html format is badly formatted, you can see a </div> in the middle and a missing one at the end of the sentence:
    <div>Révision et approbation de l&#39;ODS de Facilité.</div> <div>&#160;</div></div> <div>Compléter&#160;le questionnaire à soumettre aux experts.</div>
    <div>&#160;</div> <div>Présentation et choix des experts.
    As of now, we did not find any reason why this is happening.
    While opening back the PDP in edition and saving back ,the problem is solved.
    This is annoying because we are treating the html code as xml for reporting as seen here (http://aboutmsproject.com/converting-rtf-to-text-in-sql-revisited/
    ) and this is crashing because of badly formatted html code
    any advices?
    regards
    Jérome

    Hi Jerome,
    I've seen this issue occur when text is pasted into the field from other applications, like Outlook and Word. I've not yet been able to determine how to get it to stop. The error then causes the invalid XML issue you are seeing. A former co-worker had successfully
    integrated the use of jQuery into PDPs. I'm wondering if they have a HTML clean function.
    Thanks for finding my post useful!
    Treb Gatte, Project MVP, Tumble Road LLC |
    @tgatte | http://AboutMSProject.com

  • Multi line HTML data formatting on SSRS reprot

    Hi
    I am  using SQL Server Reporting Services 2008 , data fetching by Project server database,data value is getting by multi line rich text field.
    when showing same data in HTML format
    on ssrs reports its shows every style what ever user copy and paste on particular field like font size ,colors and them.
    I have requirement to show unique font size and unique family font,I am unable to achieve this using lot of placeholder properties.
    below u can find the example
    Hasan Jamal Siddiqui(MCTS,MCPD,ITIL@V3),Sharepoint and EPM Consultant,TCS
    |
    | Twitter

    Hi Hasan,
    According to your description that the some of the report data retrieved by multi line rich text field, which style show differently in the report, you have tried to create the placeholder using the HTML tag to format the data
    but failed to achieve, right?
    The issue due to the rich text formatting is not supported in SSRS 2008, Currently, you have mentioned that you tried to using the HTML tag to reformat the text but failed, that may due to Reporting Services support limit HTML tags when defined as placeholder
    text. Please see:
    • Hyperlinks: <A href>
    • Fonts: <FONT>
    • Header, style and block elements: <H{n}>, <DIV>, <SPAN>,<P>, <DIV>, <LI>, <HN>
    • Text format: <B>, <I>, <U>, <S>
    • List handling: <OL>, <UL>, <LI>
    In your scenario, I recommend you to take reference of method below to get the unique format text.
    Check the supported HTML tag and using the correct tag to format
    If you want to get the RTF format:
    If using Report Viewer Windows control, we can render the RTF file into IMG file, and then display the image on the report.
    Nayan Patel written good artilce about this:
    http://binaryworld.net/Main/CodeDetail.aspx?CodeId=4049
    This article give us the idea to convert RTF to image and then display on the report.
    You can also convert the RTF text to the plain text which by default in the report:
    Article have details method about the convert for your reference:
    http://stackoverflow.com/questions/2987501/rtf-to-text-in-sql-server
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0f70e01f-6315-400c-bc75-c7da5f324062/displaying-rtf-text-in-a-ssrs-2008-report?forum=sqlreportingservices
    Similar threads for your reference:
    RTF in SSRS - SQL 2008 R2
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0f70e01f-6315-400c-bc75-c7da5f324062/displaying-rtf-text-in-a-ssrs-2008-report?forum=sqlreportingservices
    Personally, I recommend you that submit this suggestion at 
    https://connect.microsoft.com/SQLServer/. If the suggestion mentioned by customers for many times, the product team may consider to add the feature in the next release of SQL Server. Your feedback is valuable for us to improve our products and increase
    the level of service provided.
    Thanks for your understanding.
    Regards
    Vicky Liu

  • Applet access to system Clipboard

    Hi all:
    I am creating a customized version of the mud telnet application for a customer. They have requested cut/paste functionality and I have been able to provide this capability. The problem is the applet cannot get access to the system clipboard so all cut/paste functions can only occur within the applet. I am able to access the system clipboard by creating a java.policy file and setting a permission. The problem is that most of the workstations, and a good number that will be using home computers running Win 98. They don't want the users to have to download the new JRE from Sun (although I know this works). I am looking for a way to creat a JAR file using the old JDK 1.1 (or the current toolkit if it is possible) that will allow access from the Applet to the System Clipboard. I have search the web for an answer, with no success. Can anyone give me any suggestions?
    Anybody had to do the same thing before?
    Thanks.
    John Kreiner

    I know this is an old thread, but I thought I would answer it.
    To access the clipboard via an applet, you need to use JavaScript.
    The first thing to do is to create a class that uses reflection to use the JSObject. The reason why reflection is used is because it is a pain (ITA) to specify a compatible binary for eacy java version (e.g. java40.jar, plugin.jar, jaws.jar, etc). Here is the class:
    import java.lang.reflect.*;
    import java.applet.Applet;
    public class JavaScript {
         public static void call(Applet applet, String methodName, Object[] param) {
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method callMethod = js.getMethod("call", new Class[] { String.class, Object[].class });
                   callMethod.invoke(getWindow(applet), new Object[] { methodName, param});
              } catch (Throwable t) {}
         public static Object getWindow(Applet applet) {
              Object o = null;
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method getWindowMethod = js.getMethod("getWindow", new Class[] { Applet.class });
                   o = getWindowMethod.invoke(null, new Object[] { applet });
              } catch (Throwable t) {}
              return o;
    }Now, when you want to copy something to the clipboard, you will do:
    JavaScript.call(someApplet, "copyToClipboard", text);
    BUT the "copyToClipboard" function has not been defined yet. This will be a JavaScript function in the html:
    <script language="JavaScript1.1">
    function copyToClipboard(text) {
         document.myForm.myInput.value = text;
         var rng = document.myForm.myInput.createTextRange();
         rng.execCommand("RemoveFormat");
         rng.execCommand("Copy");
    </script>And one last thing is that a JavaScript text component is required in order to create the "rng" variable. To do this, use a hidden field in the html:
    <form name="myForm">
         <input name="myInput" type="hidden">
         </input>
    </form>

Maybe you are looking for

  • I can't drag the view of my Pages 5.0.1 document, past halfway?

    Hi, I've been using Pages for some time.  Many times, I have refit my document view in order to place two (or more) documents side by side, no matter the screen size.  I have always had multiple levers to control these viewing options.  1)  drag wind

  • Inserting a watermark in LiveCycle

    How do I insert a watermark in liveCycle ? I shoul say I'm using the template.

  • Plz tell me wht is error in  code.its showing illegal start of expression

    import java.awt.*; import java.awt.event.*; import java.awt.image.*; class Image01 extends Frame{ //controlling class   Image rawImage;    //ref to raw image file fetched from disk   Image modImage;      //ref to modified image   int rawWidth;   int

  • Where are the default icon set for OSX located?

    Hi all. im new to osx and mac (like 2 weeks in) and really like it so far. I really like the folder icons with the stamped icon on them, like the downloads folder with the stamped down arrow, and the applications folder with the stamped A. Ive create

  • Configuring Integrated Planning

    Hi All, We are planning to configure BI - IP. The server available is SAP NetWeaver 2004s ( Abap + Java ). Support Packs : SAP_ABA               700      0014   SAPKA70014   Cross-Application Component SAP_BASIS            700      0014   SAPKB70014