How to print data

Hi
I am trying to printout text area data
Please help me how to do this?
and also give idea about how to print table data ?

Here's a quick-and-dirty example of how to get something to print from Java. As you can see, the Prinatable interface defines a print() method. That print() is passed in a Graphics objects. That Graphics object is then used by the object you want to print to print itself to. In this example, I just dummied up a Canvas whos paint(Graphics) method just writes out a string. This same call to paint() from print might work for a Table.
Of course this example is terribly rudimentary, but it does actually print (for me).
import java.awt.print.*;
import java.awt.*;
public class Main
     public static void main(String[] args)
          PrintableCanvas printMe = new Main().new PrintableCanvas();
          printMe.setSize(500,500);
          PrinterJob pj = PrinterJob.getPrinterJob();
          pj.setPrintable(printMe);
          try
               pj.print();
          catch(PrinterException pe)
               pe.printStackTrace();
     class PrintableCanvas extends Canvas implements Printable
          public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
               paint(graphics);
               if(pageIndex == 0)
                    return PAGE_EXISTS;
               else
                    return NO_SUCH_PAGE;
          public void paint(Graphics graphics)
               graphics.drawString("This was printed from Java",200,200);
}

Similar Messages

  • How to print Data Model in Report??

    Do anyone know how to print Data Model??
    Thanks your help.
    - Frank

    Hi Venkat,
    Thanks alot.... i am checking the appendix k.
    I want to know that if i want to customize the report as per the client requirement,
    can you please let me know which template i will use if i required remittence advice as well as check print data on the layout.
    The following is the list of field i required:
    Vendor ID
    Check Date
    Check number
    invoice date
    invoice/ CR memo number
    invoice description
    invoice gross amount
    invoice discount amount
    invoice net amount
    total gross amount
    total discount amount
    total net amount
    logo
    company name and info
    bank name and info
    check number
    check amount spelled out
    check date
    check amount numeric
    payee name
    CEO signature
    MICR check number
    MICR routing number
    MICR bank account number
    mailing return address
    mailing address
    Venkat it would be great help if you please let me know the exact process to be follow for check printing report.
    I worked on bi publisher report in 11i, but in 12i the process is bit different.
    also if you have any template ready can you please send me on my mail id ... i forwarded you the test mail from my official id or on [email protected]
    Looking forward to your kind response.
    Regards
    Ratnesh

  • How to print date & time in photos

    Thanks for the help.
    I need to print either photos with time and dates in them... or the Bridge contact sheet with date and time info.
    The final printed image will be used in court to photo document evidence.
    Do I have to do a screen capture or is there some other way?
    My camera will not allow me to imprint time and date.
    I'm using CS4 on both Windows and Mac.
    Thanks again in advance for the taking the time to help.
    Dances With Pixels
    I may have sent this twice, but I'm new to this and this is my first time trying to post.

    Thank you for taking the time to respond.  Much appreciated. 
    And will follow up on your suggestions.
    Date: Tue, 10 Aug 2010 23:55:31 -0600
    From: [email protected]
    To: [email protected]
    Subject: How to print date & time in photos
    I think there are (various) Scripts about for that.
    For example addExifDate1.5.jsx:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1346521
    One should be able to adapt it to include the time.
    You could ask in the Photoshop Scripting Forum or http://www.ps-scripts.com/
    >

  • How to print date & time stamp on photos?

    How to print date & time stamp on photos?

    Three methods:
    File>process multiple files>labels. Be sure to uncheck "same as source", or the originals will be overwritten. It is best to work on duplicate files, esp. while learning.
    Use the horizontal or vertical type tool to add the information manually to each picture file
    If the same information is to be applied to several pictures, e.g. a copyright notice, use  of a brush made in PSE is very efficient

  • How to print date/time in report page footer?

    Hi
    I have a report which users can print as PDF.
    However, I like to display current date/time in report footer.
    I can see the Page Footer in section but can't figure out how to print date/time there.
    Thanks for help.

    hi movilogo
    Please try this.
    Create hidden item P1_DATE
    Create On load process in page 1 and put this code
    begin
    :P1_DATE:=TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MM:SS');
    end;
    Open your region in Page 1 put this code in Footer area
    *&P1_DATE.*
    Refresh your page.
    you will get the output like this.
    16-SEP-2009 11:09:17
    thanks
    Mark Wyatt

  • How to print date in cheque box in sapscript??

    Hello Guru,
    We have developed or design new form for cheque printing in sapscript
    how to print date in cheque box in sap.
    1
    6
    1
    2
    2
    0
    1
    1
    thanks in advance.
    Thanks & Regards
    Richa

    hi,
    If your requirement is to display date with box,first create a Box by using following syntax
    *   &sy-datum&
    /:  BOX XPOS '0' CH YPOS '3.65' LN WIDTH '77.50' CH HEIGHT '4.5' LN FRAME '10' tw
    then adjust the box size according to your requirement by changing xpos,ypos,width and height
    with regards
    Edited by: naresh bammidi on Dec 16, 2011 8:00 AM

  • How to print data in CCMMDDYY

    how to print data in the following format
    "CCMMDDYY"

    hi
    good
    yes you can very much print in that format, just follow this process
    1-declare 4 strings
    2-store all the different type of data in different variables
    3-concatenate them and store them in a different variable
    4-display tht varibale which contain that concatenate value
    thanks
    mrutyun^

  • How to print date with prefix in oracle reports?

    Hi Everyone,
    Please help to get solution for this problem.
    How can we generate View image: oracle Reports in Oracle Reports RDF ?
    we can print date , but i want to print date and st in smaller case and in top right side of date.
    for eg  31st   st should be small and in top right part.
    Please refer the image : i have inserted link for image.
    Thanks in advance,
    HP

    You just go into the paper layout---> ...
    No, first step is to ask the question in the Reports forum :-)
    Edit: TIP: How to find a forum or community

  • How to print data of selection screen

    hi plz tell me how to print that data in smartforms which the user enters in the selection screen...........

    Use FM RS_COVERPAGE_SELECTIONS
        CALL FUNCTION 'RS_COVERPAGE_SELECTIONS'
             EXPORTING
                  REPORT            = L_REPORTIDENTIFICATION
                  VARIANT           = SY-SLSET
                  NO_IMPORT         = 'X'                       "07/04/98
             TABLES
                  INFOTAB           = T_INFOSELECT
             EXCEPTIONS
                  ERROR_MESSAGE     = 1
                  VARIANT_NOT_FOUND = 3
                  OTHERS            = 2.

  • How to print date on photos

    Can anyone please advise how to print the date on photos on my HP C6380 All in One printer.  I have managed to change the settings  to do it before but now it is defeating me.  I would like to make it a default if I can.
    This question was solved.
    View Solution.

    Well since there is no date and time setting on the printer you will have to use whatever software you have to super impose a time and date on the photo.  Then print it on the printer.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • How to print data from SAP without showing the screen.

    I need to develop one RFC.It will call by third party tool like XMII.
    Required data will come from XMII and RFC should print data directly from printer.
    RFC should call transaction QM02>Notification>Print>Item Selection>select one of the Shop paper -->Print (No.of copies and name of printer will be given by XMII)

    Hi Priya,
    Build a process chain, to load the Cube and after the load completed, delete the PSA used to load the Cube.
    Also include in this chain a generated ABAP program to selective delete data from your DSO based on some selection/variant , ex: Fiscal Year or something.
    Also check the design and find a reason for using DSO, if no reason then just load into CUBE.
    Hope this helps.
    Thanks,
    Naveen Rao Kattela

  • How to Print data from variable or  in header of the table in smart forms

    Hi all.
    i have to print mondy tuseday etc in the header of the table . the actual data is printed ok  in the main area from itab where as i m unable to print data in header from that itab.
    i have tried from one variable as well . as i export that value to the smart form andthen try to print but i won't be able to do that
    Regards
    Ammad

    please post the question clearly.

  • How to PRINT DATA in classical report when ever execute

    Hi,
    All ABAP experts,
         I am updating PM work order in IW32 by using BADI, with addition to success or error log i need to display data in basic list and also system has to print that data automatically by using system's default printer. User can not press print button in basic list because sometimes this program will schedule in background, due to this user wants see upload results in a print out.
             I don’t know how to write logic to get output like this. Please can anyone share how to write logic for this issue. 
    Before posting this issue i search in forms but I didn’t get appropriate solution.
    Thanks in advance and any sort of help will appreciate highly.

    Hi,
    Try with this piece of code
    Declaration of local constants
      CONSTANTS :  lc_paart LIKE sy-paart VALUE 'X_65_132',  " Paper Format
                   lc_locl  TYPE sypdest VALUE 'LOCL'.       " Destination
        MOVE 'X' TO v_print.
    Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          immediately            = v_print
          new_list_id            = c_x
          no_dialog              = c_x
          user                   = sy-uname
        IMPORTING
          out_parameters         = v_print_parms
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc NE 0.
        CLEAR : v_print_parms.
      ENDIF.
    The printer destination has to be  set up
      IF v_print_parms-pdest = space.
        v_print_parms-pdest = lc_locl.
      ENDIF.
    Explicitly set line width, and output format so that
    the PDF conversion comes out OK
      v_print_parms-linsz = c_linsz.
      v_print_parms-paart = lc_paart.
    Regards,
    nagaraj

  • How to print data using JSP

    I have a jsp/html page. Which has some data and I want to print the data of that page using jsp.Means I want to display the page and an option which will ask whether user wants to print the page or not. And if the user select print option then it will print the displayed page using printer.
    Please help me how I can proceed.
    Regards,
    Sundeep Mohanty

    Yes
    window.print will print the current displayed page
    also...it wuill not print directly...but will open the print dialog box of ur default printer i guess.

  • How to print data from database

    Hi,
    Assume that the HR web application contains a JSP page that displays the employees in paged table. The employees table has a link "Print" witch suppose to print al the records from database NOT only the data that is shown in the current page.
    For example:
    The employees.jsp displays a table of 15 rows, paging links (first, previous, 1, 2, 3, next, last) and "Print" link.
    When the user click on Print link or button , it should popup the print dialog then print all the records of employees from the database NOT only the 15 that are shown in current page.
    What do I tried??
    I do display all employees records in one JSP page (printableEmployess.jsp) and divide them to tables, where is every 35 record in one table. But this methodology is not efficiently, because one company in my application has 20,000 records so the JSP page is too huge .
    Kindly help me to fix this problem.

    The put it bluntly: the browser can only print what it has received from the server. If you want to print everything, you have to send everything. If you don't want to do that, you'll have to stick to the multiple pages and then the user has to print every page himself.
    If this is a really big problem for you, then you'll have to concider alternative solutions, like a Java client application that can connect to your server to retrieve the data and then print it using the Java printing API. That puts the problem outside the browser, but the user will have to have java installed on his machine.

Maybe you are looking for

  • Â shows up on a published ftp site instead of 2 spaces-and other characters

    Hope this is an easy one I missed some how. I have iWeb '08(2.0.4) and need to publish to a unix server through FTP. So I publish to a folder and then ftp to my web site. When I do this I get  when I should be getting 2 spaces. Which happens after e

  • How to discable password change in SAP ERP (or any ABAP system)

    Hello, We have password synchronization between Sun Identity Management system and SAP ABAP systems. This ensures that the password is identical between the network ID and SAP ID. In order to avoid any issues, we would like to disable the ability of

  • Save operation now recorded in the History panel

    It used to be that if you stepped back in History and hit Save or Save As, you could step forward again and continue working while not losing any steps. Now with the Save and Save As showing up as history steps, if you step back and Save your then lo

  • How to know the SIM card is BIS enabled or not?

    Hi I have developed a http connection based BlackBerry application. I am able to download the application and install properly on the device. But I am not able to make http connection through the application. Programmatically all the connections were

  • Alternate Conversion Channel

    On a previous post, It was recomended that I use the "Alternate Conversion Channel" setup as per http://ims.balius.com/downloads/AlternateConversion.pdf I just seem to have trouble getting it to work. After applying the settings, The IMS does not cha