Pls...printing the whole delivery order

Hi,
Can anyone pls modify the source code here in order for me to print out delivery order.Actually i have done it,but the problem is the printed delivery order is at the down side of A4 paper.
Can anyone pls modify the source code below and and print out the it nicely.And i do not want to see print button and exit button when it is printed out.Thank you very much.
Source:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.sql.*;
import java.net.*;
import java.io.*;
import java.util.*;
import java.awt.print.*;
import java.awt.geom.*;
public class ConfirmDeliveryOrderDialog extends JDialog implements ActionListener,Printable
private ResultSetTableModel retrieveDOInfoModel;
private JTable newDOTable;
private JScrollPane newDOSp;
private JLabel comT1,comT2,comT3,doT,doID,doIDNo,receivedDate,actualReceivedDate,deliveryTo,deliveryToCustomerInfo,
companyAddress,companyAddressInfo,tel,telNo,dispatchDate,actualDispatchDate,total,totalQuantity,
inputTotalQuantity,totalKg,inputTotalKg,remark,inputRemark;
private Line2D line,line1;
private Graphics2D g;
private Container cp;
private JButton printBtn,exitBtn;
private Connection con;
private Statement retrieveDOInfoStmt;
private ResultSet retrieveDOInfoRs;
//private PageFormat pageFormat;
int quan,Kg;
boolean centered = true;
public ConfirmDeliveryOrderDialog(JDialog parent)
super(parent,"New Delivery Order",true);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = Laundry.getConnection();
retrieveDOInfoStmt = con.createStatement();
String retrieveDOInfo = "SELECT ItemName,ItemTypeName,WashingType,CleaningType,ItemCategory,QuantityOrKg AS [Quantity/Kg] " +
"FROM DoDetail,DOInfo " +
"WHERE DODetail.DOID = DOInfo.DOID " +
"AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
"AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0);
retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
if(Laundry.SCROLLABLE)
retrieveDOInfoModel = new ScrollingResultSetTableModel(retrieveDOInfoRs);
else
retrieveDOInfoModel = new CachingResultSetTableModel(retrieveDOInfoRs);
newDOTable = new JTable(retrieveDOInfoModel);
newDOSp = new JScrollPane(newDOTable);
newDOTable.getTableHeader().setReorderingAllowed(false);
newDOTable.setPreferredScrollableViewportSize(new Dimension(550,350));
retrieveDOInfoStmt.close();
con.close();
cp = getContentPane();
cp.add(newDOSp, BorderLayout.CENTER);
catch(SQLException ext)
JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
while (ext != null)
JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
ext = ext.getNextException();
catch(ClassNotFoundException ex)
JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
ex.printStackTrace();
catch(Exception e)
JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = Laundry.getConnection();
retrieveDOInfoStmt = con.createStatement();
String retrieveDOInfo = "SELECT DODetail.DOID,SUM(QuantityOrKg) AS [Total Quantity] " +
"FROM DoDetail,DoInfo " +
"WHERE DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
"AND ItemCategory = 'Piece' " +
"AND DODetail.DOID = DOInfo.DOID " +
"AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0) +
"GROUP BY DODetail.DOID";
retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
while(retrieveDOInfoRs.next())
quan = retrieveDOInfoRs.getInt("Total Quantity");
retrieveDOInfoStmt.close();
con.close();
catch(SQLException ext)
JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
while (ext != null)
JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
ext = ext.getNextException();
catch(ClassNotFoundException ex)
JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
ex.printStackTrace();
catch(Exception e)
JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = Laundry.getConnection();
retrieveDOInfoStmt = con.createStatement();
String retrieveDOInfo = "SELECT DODetail.DOID,SUM(QuantityOrKg) AS [Total Kg] " +
"FROM DoDetail,DoInfo " +
"WHERE DODetail.DOID = DOInfo.DOID " +
"AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0) +
"AND ItemCategory = 'Kg' " +
"AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
"GROUP BY DODetail.DOID ";
retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
while(retrieveDOInfoRs.next())
Kg = retrieveDOInfoRs.getInt("Total Kg");
retrieveDOInfoStmt.close();
con.close();
catch(SQLException ext)
JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
while (ext != null)
JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
ext = ext.getNextException();
catch(ClassNotFoundException ex)
JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
ex.printStackTrace();
catch(Exception e)
JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
comT1 = new JLabel("Deluxe Laundry Sdn Bhd");
comT1.setFont(new Font("Sanserif",Font.BOLD,12));
comT2 = new JLabel("Lot 1641, Jln Sungai Tua, Batu Caves, 68100 Selangor Darul Ehsan");
comT2.setFont(new Font("Sanserif",Font.PLAIN,10));
comT3 = new JLabel("Tel : 03-61863093 03-61863091 Fax : 03-61863096");
comT3.setFont(new Font("Sanserif",Font.PLAIN,10));
Box comBox = Box.createVerticalBox();
comBox.add(Box.createVerticalStrut(5));
comBox.add(comT1);
comBox.add(Box.createVerticalStrut(2));
comBox.add(comT2);
comBox.add(Box.createVerticalStrut(2));
comBox.add(comT3);
comBox.add(Box.createVerticalStrut(2));
Box comNBox = Box.createHorizontalBox();
comNBox.add(Box.createHorizontalStrut(10));
comNBox.add(comBox);
comNBox.add(Box.createHorizontalStrut(300));
doT = new JLabel("Delivery Order");
doT.setFont(new Font("Sanserif",Font.BOLD,17));
doID = new JLabel("DO ID : ");
doID.setFont(new Font("Sanserif",Font.BOLD,12));
doIDNo = new JLabel("");
doIDNo.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(0));
doIDNo.setFont(new Font("Sanserif",Font.PLAIN,12));
receivedDate = new JLabel("Received Date : ");
receivedDate.setFont(new Font("Sanserif",Font.BOLD,12));
actualReceivedDate = new JLabel("");
actualReceivedDate.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(1));
actualReceivedDate.setFont(new Font("Sanserif",Font.PLAIN,12));
JPanel jp = new JPanel();
jp.setLayout(new GridLayout(2,2));
jp.add(doID);
jp.add(doIDNo);
jp.add(receivedDate);
jp.add(actualReceivedDate);
Box doBox = Box.createHorizontalBox();
doBox.add(Box.createHorizontalStrut(200));
doBox.add(doT);
doBox.add(Box.createHorizontalStrut(50));
doBox.add(jp);
doBox.add(Box.createHorizontalStrut(30));
deliveryTo = new JLabel("Delivery To : ");
deliveryTo.setFont(new Font("Sanserif",Font.BOLD,12));
deliveryToCustomerInfo = new JLabel("");
deliveryToCustomerInfo.setText("" + Laundry.companyDetails.get(1));
deliveryToCustomerInfo.setFont(new Font("Sanserif",Font.PLAIN,12));
companyAddress = new JLabel("");
companyAddress.setFont(new Font("Sanserif",Font.BOLD,12));
companyAddressInfo = new JLabel("");
companyAddressInfo.setText("" + Laundry.companyDetails.get(2));
companyAddressInfo.setFont(new Font("Sanserif",Font.PLAIN,12));
tel = new JLabel("Tel : ");
tel.setFont(new Font("Sanserif",Font.BOLD,12));
telNo = new JLabel("");
telNo.setText("" + '0'+Laundry.companyDetails.get(3));
telNo.setFont(new Font("Sanserif",Font.PLAIN,12));
dispatchDate = new JLabel("Dispatch Date : ");
dispatchDate.setFont(new Font("Sanserif",Font.BOLD,12));
actualDispatchDate = new JLabel("");
actualDispatchDate.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(2));
actualDispatchDate.setFont(new Font("Sanserif",Font.PLAIN,12));
remark = new JLabel("Remark");
remark.setFont(new Font("Sanserif",Font.BOLD,12));
inputRemark = new JLabel("");
inputRemark = new JLabel("" + EnterDeliveryOrderNumberDialog.DOInfo.get(3));
inputRemark.setFont(new Font("Sanserif",Font.PLAIN,12));
JPanel jp1 = new JPanel();
jp1.setLayout(new GridLayout(5,2,5,5));
jp1.add(deliveryTo);
jp1.add(deliveryToCustomerInfo);
jp1.add(companyAddress);
jp1.add(companyAddressInfo);
jp1.add(tel);
jp1.add(telNo);
jp1.add(dispatchDate);
jp1.add(actualDispatchDate);
jp1.add(remark);
jp1.add(inputRemark);
Box customerInfoBox = Box.createHorizontalBox();
customerInfoBox.add(Box.createHorizontalStrut(10));
customerInfoBox.add(jp1);
customerInfoBox.add(Box.createHorizontalStrut(300));
Box northBox = Box.createVerticalBox();
northBox.add(Box.createVerticalStrut(5));
northBox.add(comNBox);
northBox.add(Box.createVerticalStrut(5));
northBox.add(doBox);
northBox.add(Box.createVerticalStrut(5));
northBox.add(customerInfoBox);
northBox.add(Box.createVerticalStrut(5));
Shape firstShape = new Rectangle(350,100,10,5);
printBtn = new JButton("Print");
printBtn.addActionListener(this);
exitBtn = new JButton("Exit");
exitBtn.addActionListener(this);
JPanel jp3 = new JPanel();
jp3.add(printBtn);
jp3.add(exitBtn);
total = new JLabel("Total");
totalQuantity = new JLabel("Quantity");
totalQuantity.setFont(new Font("Sanserif",Font.PLAIN,12));
inputTotalQuantity = new JLabel("");
inputTotalQuantity.setFont(new Font("Sanserif",Font.PLAIN,12));
inputTotalQuantity.setText("" + quan);
totalKg = new JLabel("Kg");
totalKg.setFont(new Font("Sanserif",Font.PLAIN,12));
inputTotalKg = new JLabel("");
inputTotalKg.setFont(new Font("Sanserif",Font.PLAIN,12));
inputTotalKg = new JLabel("" + Kg);
Box totalBox = Box.createHorizontalBox();
totalBox.add(Box.createHorizontalStrut(270));
totalBox.add(total);
totalBox.add(Box.createHorizontalStrut(50));
totalBox.add(totalQuantity);
totalBox.add(Box.createHorizontalStrut(50));
totalBox.add(inputTotalQuantity);
totalBox.add(Box.createHorizontalStrut(30));
totalBox.add(totalKg);
totalBox.add(Box.createHorizontalStrut(50));
totalBox.add(inputTotalKg);
totalBox.add(Box.createHorizontalStrut(30));
Box southBox = Box.createVerticalBox();
southBox.add(Box.createVerticalStrut(10));
southBox.add(totalBox);
southBox.add(Box.createVerticalStrut(5));
southBox.add(jp3);
cp = getContentPane();
cp.add(northBox, BorderLayout.NORTH);
cp.add(southBox, BorderLayout.SOUTH);
setSize(600,400);
setLocation(100,100);
public void actionPerformed(ActionEvent ae)
if(ae.getSource() == printBtn)
PageFormat page = new PageFormat();
Paper paper = new Paper();
paper.setSize(595.275590551181,841.8897637795276);
paper.setImageableArea(70.8661417322835,70.8661417322835,453.5433070866141,700.1574803149607);
page.setPaper(paper);
page.setOrientation(PageFormat.PORTRAIT);
PrinterJob printJob = PrinterJob.getPrinterJob();
if(page == null)
page = printJob.defaultPage();
printJob.setPrintable(this,page);
if(printJob.printDialog())
try
printJob.print();
catch(PrinterException e)
JOptionPane.showMessageDialog(this,e);
else if(ae.getSource() == exitBtn)
EnterDeliveryOrderNumberDialog.removeDOInfo();
setVisible(false);
public int print(Graphics g, PageFormat pf, int page) throws PrinterException
if(page >= 1)
return Printable.NO_SUCH_PAGE;
Graphics2D g2 = (Graphics2D)g;
g2.translate(pf.getImageableX(), pf.getImageableY());
if(centered)
g2.translate(pf.getImageableWidth() - 2.5, pf.getImageableHeight() - 2.5);
Dimension d = getSize();
double scale = Math.min(pf.getImageableWidth() / d.width, pf.getImageableHeight() / d.height);
if (scale < 1.0)
g2.scale(scale, scale);
if (centered)
g2.translate(-d.width - 2.5, -d.height - 2.5);          
paint(g2);
return Printable.PAGE_EXISTS;

Hi Eswar,
Even 10 points are not enough to show my gratitude.
I really appreciate the help extended by you.
Able to send the file as PDF attachment without any fuss.
bcs classes are new to me.
One more question.
I hard coded the mail ID. if i need to pass multiple mail id's i need to declare p_mail as internal table or ranges and append them to p_email! am i right?
    l_recipient = cl_cam_address_bcs=>create_internet_address( p_mail ).
      CALL METHOD l_send_request->add_recipient
        EXPORTING
          i_recipient  = l_recipient
          i_express    = 'U'
          i_copy       = ' '
          i_blind_copy = ' '
          i_no_forward = ' '.

Similar Messages

  • Pls...help...printing the whole delivery order...very very urgent

    Can anybody help me in this code.
    I would like to print out delivery order,but when i printed,it just printed out the whole delivery order in the bottom of A4 paper.Can anybody modify the source code and give me proper one?
    I would it to fit on A4 paper.
    These are the soource code,Pls help,it's very urgent.Thanks for any help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.awt.print.*;
    import java.awt.geom.*;
    public class ConfirmDeliveryOrderDialog extends JDialog implements ActionListener,Printable
    private ResultSetTableModel retrieveDOInfoModel;
    private JTable newDOTable;
    private JScrollPane newDOSp;
    private JLabel comT1,comT2,comT3,doT,doID,doIDNo,receivedDate,actualReceivedDate,deliveryTo,deliveryToCustomerInfo,
    companyAddress,companyAddressInfo,tel,telNo,dispatchDate,actualDispatchDate,total,totalQuantity,
    inputTotalQuantity,totalKg,inputTotalKg,remark,inputRemark;
    private Line2D line,line1;
    private Graphics2D g;
    private Container cp;
    private JButton printBtn,exitBtn;
    private Connection con;
    private Statement retrieveDOInfoStmt;
    private ResultSet retrieveDOInfoRs;
    int quan,Kg;
    boolean centered = true;
    public ConfirmDeliveryOrderDialog(JDialog parent)
    super(parent,"New Delivery Order",true);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = Laundry.getConnection();
    retrieveDOInfoStmt = con.createStatement();
    String retrieveDOInfo = "SELECT ItemName,ItemTypeName,WashingType,CleaningType,ItemCategory,QuantityOrKg AS [Quantity/Kg] " +
    "FROM DoDetail,DOInfo " +
    "WHERE DODetail.DOID = DOInfo.DOID " +
    "AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
    "AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0);
    retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
    if(Laundry.SCROLLABLE)
    retrieveDOInfoModel = new ScrollingResultSetTableModel(retrieveDOInfoRs);
    else
    retrieveDOInfoModel = new CachingResultSetTableModel(retrieveDOInfoRs);
    newDOTable = new JTable(retrieveDOInfoModel);
    newDOSp = new JScrollPane(newDOTable);
    newDOTable.getTableHeader().setReorderingAllowed(false);
    newDOTable.setPreferredScrollableViewportSize(new Dimension(550,350));
    retrieveDOInfoStmt.close();
    con.close();
    cp = getContentPane();
    cp.add(newDOSp, BorderLayout.CENTER);
    catch(SQLException ext)
    JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
    while (ext != null)
    JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
    ext = ext.getNextException();
    catch(ClassNotFoundException ex)
    JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
    ex.printStackTrace();
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = Laundry.getConnection();
    retrieveDOInfoStmt = con.createStatement();
    String retrieveDOInfo = "SELECT SUM(QuantityOrKg) AS [Total Quantity] " +
    "FROM DOInfo,DODetail " +
    "WHERE DOInfo.DOID = DODetail.DOID " +
    "AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
    "AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0) +
    "AND ItemCategory = 'Piece' " +
    "GROUP BY DODetail.DOID ";
    retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
    while(retrieveDOInfoRs.next())
    quan = retrieveDOInfoRs.getInt("Total Quantity");
    retrieveDOInfoStmt.close();
    con.close();
    catch(SQLException ext)
    JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
    while (ext != null)
    JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
    ext = ext.getNextException();
    catch(ClassNotFoundException ex)
    JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
    ex.printStackTrace();
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = Laundry.getConnection();
    retrieveDOInfoStmt = con.createStatement();
    String retrieveDOInfo = "SELECT SUM(QuantityOrKg) AS [Total Kg] " +
    "FROM DOInfo, DODetail " +
    "WHERE DOInfo.DOID = DODetail.DOID " +
    "AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0) +
    "AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
    "AND ItemCategory = 'Kg' " +
    "GROUP BY DODetail.DOID ";
    retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
    while(retrieveDOInfoRs.next())
    Kg = retrieveDOInfoRs.getInt("Total Kg");
    retrieveDOInfoStmt.close();
    con.close();
    catch(SQLException ext)
    JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
    while (ext != null)
    JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
    ext = ext.getNextException();
    catch(ClassNotFoundException ex)
    JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
    ex.printStackTrace();
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
    comT1 = new JLabel("Deluxe Laundry Sdn Bhd");
    comT1.setFont(new Font("Sanserif",Font.BOLD,12));
    comT2 = new JLabel("Lot 1641, Jln Sungai Tua, Batu Caves, 68100 Selangor Darul Ehsan");
    comT2.setFont(new Font("Sanserif",Font.PLAIN,10));
    comT3 = new JLabel("Tel : 03-61863093 03-61863091 Fax : 03-61863096");
    comT3.setFont(new Font("Sanserif",Font.PLAIN,10));
    Box comBox = Box.createVerticalBox();
    comBox.add(Box.createVerticalStrut(5));
    comBox.add(comT1);
    comBox.add(Box.createVerticalStrut(2));
    comBox.add(comT2);
    comBox.add(Box.createVerticalStrut(2));
    comBox.add(comT3);
    comBox.add(Box.createVerticalStrut(2));
    Box comNBox = Box.createHorizontalBox();
    comNBox.add(Box.createHorizontalStrut(10));
    comNBox.add(comBox);
    comNBox.add(Box.createHorizontalStrut(300));
    //line = new Line2D.Float();
    //line.setLine(10,50,600,50);
    //Graphics2D dfl = (Graphics2D)g;
    //dfl.drawLine(10,50,600,50);
    doT = new JLabel("Delivery Order");
    doT.setFont(new Font("Sanserif",Font.BOLD,17));
    doID = new JLabel("DO ID : ");
    doID.setFont(new Font("Sanserif",Font.BOLD,12));
    doIDNo = new JLabel("");
    doIDNo.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(0));
    doIDNo.setFont(new Font("Sanserif",Font.PLAIN,12));
    receivedDate = new JLabel("Received Date : ");
    receivedDate.setFont(new Font("Sanserif",Font.BOLD,12));
    actualReceivedDate = new JLabel("");
    actualReceivedDate.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(1));
    actualReceivedDate.setFont(new Font("Sanserif",Font.PLAIN,12));
    JPanel jp = new JPanel();
    jp.setLayout(new GridLayout(2,3));
    jp.add(doID);
    jp.add(doIDNo);
    jp.add(receivedDate);
    jp.add(actualReceivedDate);
    Box doBox = Box.createHorizontalBox();
    doBox.add(Box.createHorizontalStrut(200));
    doBox.add(doT);
    doBox.add(Box.createHorizontalStrut(50));
    doBox.add(jp);
    doBox.add(Box.createHorizontalStrut(100));
    //line1 = new Line2D.Float();
    //line1.setLine(10,0,600,0);
    //Graphics2D df2 = (Graphics2D)g;
    //df2.drawLine(10,100,600,100);
    deliveryTo = new JLabel("Delivery To :");
    deliveryTo.setFont(new Font("Sanserif",Font.BOLD,12));
    deliveryToCustomerInfo = new JLabel("");
    deliveryToCustomerInfo.setText("" + Laundry.companyDetails.get(1));
    deliveryToCustomerInfo.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box deliveryToBox = Box.createHorizontalBox();
    deliveryToBox.add(Box.createHorizontalStrut(10));
    deliveryToBox.add(deliveryTo);
    deliveryToBox.add(Box.createHorizontalStrut(10));
    deliveryToBox.add(deliveryToCustomerInfo);
    deliveryToBox.add(Box.createHorizontalStrut(500));
    companyAddress = new JLabel("");
    companyAddress.setFont(new Font("Sanserif",Font.BOLD,12));
    companyAddressInfo = new JLabel("");
    companyAddressInfo.setText("" + Laundry.companyDetails.get(2));
    companyAddressInfo.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box companyAddressBox = Box.createHorizontalBox();
    companyAddressBox.add(Box.createHorizontalStrut(98));
    companyAddressBox.add(companyAddress);
    companyAddressBox.add(Box.createHorizontalStrut(10));
    companyAddressBox.add(companyAddressInfo);
    companyAddressBox.add(Box.createHorizontalStrut(500));
    tel = new JLabel("Tel :");
    tel.setFont(new Font("Sanserif",Font.BOLD,12));
    telNo = new JLabel("");
    telNo.setText("" + '0'+Laundry.companyDetails.get(3));
    telNo.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box telBox = Box.createHorizontalBox();
    telBox.add(Box.createHorizontalStrut(10));
    telBox.add(tel);
    telBox.add(Box.createHorizontalStrut(10));
    telBox.add(telNo);
    telBox.add(Box.createHorizontalStrut(500));
    dispatchDate = new JLabel("Dispatch Date :");
    dispatchDate.setFont(new Font("Sanserif",Font.BOLD,12));
    actualDispatchDate = new JLabel("");
    actualDispatchDate.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(2));
    actualDispatchDate.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box dispatchBox = Box.createHorizontalBox();
    dispatchBox.add(Box.createHorizontalStrut(10));
    dispatchBox.add(dispatchDate);
    dispatchBox.add(Box.createHorizontalStrut(10));
    dispatchBox.add(actualDispatchDate);
    dispatchBox.add(Box.createHorizontalStrut(500));
    remark = new JLabel("Remark :");
    remark.setFont(new Font("Sanserif",Font.BOLD,12));
    inputRemark = new JLabel("");
    inputRemark.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(3));
    inputRemark.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box remarkBox = Box.createHorizontalBox();
    remarkBox.add(Box.createHorizontalStrut(10));
    remarkBox.add(remark);
    remarkBox.add(Box.createHorizontalStrut(10));
    remarkBox.add(inputRemark);
    remarkBox.add(Box.createHorizontalStrut(500));
    Box infoBox = Box.createVerticalBox();
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(deliveryToBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(companyAddressBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(telBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(dispatchBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(remarkBox);
    infoBox.add(Box.createVerticalStrut(5));
    Box northBox = Box.createVerticalBox();
    northBox.add(Box.createVerticalStrut(5));
    northBox.add(comNBox);
    northBox.add(Box.createVerticalStrut(5));
    northBox.add(doBox);
    northBox.add(Box.createVerticalStrut(5));
    northBox.add(infoBox);
    northBox.add(Box.createVerticalStrut(5));
    Shape firstShape = new Rectangle(350,100,10,5);
    //Font font = new Font("Sanserif",Font.PLAIN,5);
    String text = "Checked By";
    //g.drawString(text,365,105);
    //g.setFont(new Font("Sanserif",Font.PLAIN,5));
    //g.fill(firstShape);
    //g.draw(firstShape);
    //Box joinBox = Box.createHorizontalBox();
    //joinBox.add(northBox);
    //joinBox.add(Box.createHorizontalStrut(10));
    //joinBox.add(g);
    printBtn = new JButton("Print");
    printBtn.addActionListener(this);
    exitBtn = new JButton("Exit");
    exitBtn.addActionListener(this);
    JPanel jp3 = new JPanel();
    jp3.add(printBtn);
    jp3.add(exitBtn);
    total = new JLabel("Total");
    totalQuantity = new JLabel("Quantity");
    totalQuantity.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalQuantity = new JLabel("");
    inputTotalQuantity.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalQuantity.setText("" + quan);
    totalKg = new JLabel("Kg");
    totalKg.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalKg = new JLabel("");
    inputTotalKg.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalKg.setText("" + Kg);
    Box totalBox = Box.createHorizontalBox();
    totalBox.add(Box.createHorizontalStrut(270));
    totalBox.add(total);
    totalBox.add(Box.createHorizontalStrut(50));
    totalBox.add(totalQuantity);
    totalBox.add(Box.createHorizontalStrut(50));
    totalBox.add(inputTotalQuantity);
    totalBox.add(Box.createHorizontalStrut(30));
    totalBox.add(totalKg);
    totalBox.add(Box.createHorizontalStrut(50));
    totalBox.add(inputTotalKg);
    totalBox.add(Box.createHorizontalStrut(30));
    Box southBox = Box.createVerticalBox();
    southBox.add(Box.createVerticalStrut(10));
    southBox.add(totalBox);
    southBox.add(Box.createVerticalStrut(5));
    southBox.add(jp3);
    cp = getContentPane();
    cp.add(northBox, BorderLayout.NORTH);
    cp.add(southBox, BorderLayout.SOUTH);
    setSize(600,400);
    setLocation(100,100);
    public void actionPerformed(ActionEvent ae)
    if(ae.getSource() == printBtn)
    PageFormat page = new PageFormat();
    Paper paper = new Paper();
    paper.setSize(595.275590551181,841.8897637795276);
    paper.setImageableArea(70.8661417322835,70.8661417322835,453.5433070866141,700.1574803149607);
    page.setPaper(paper);
    page.setOrientation(PageFormat.PORTRAIT);
    PrinterJob printJob = PrinterJob.getPrinterJob();
    if(page == null)
    page = printJob.defaultPage();
    printJob.setPrintable(this,page);
    if(printJob.printDialog())
    try
    printJob.print();
    setVisible(false);
    JOptionPane.showMessageDialog(null,"Please Generate Normal Or Express JobList","JobList",JOptionPane.INFORMATION_MESSAGE);
    catch(PrinterException e)
    JOptionPane.showMessageDialog(this,e);
    else if(ae.getSource() == exitBtn)
    EnterDeliveryOrderNumberDialog.removeDOInfo();
    setVisible(false);
    public int print(Graphics g, PageFormat pf, int page) throws PrinterException
    if(page >= 1)
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D)g;
    g2.translate(pf.getImageableX(), pf.getImageableY());
    if(centered)
    g2.translate(pf.getImageableWidth(), pf.getImageableHeight());
    Dimension d = getSize();
    double scale = Math.min(pf.getImageableWidth() / d.width, pf.getImageableHeight() / d.height);
    if (scale < 1.0)
    g2.scale(scale, scale);
    if (centered)
    g2.translate(-d.width, -d.height);          
    paint(g2);
    return Printable.PAGE_EXISTS;

    Hi Thanx, your code helped. I have got another question. How do i implement a method from another method class into the applet. say, i want to implemen set frequency from the below code into my applet you wrote above?
    class Histogram
         int frequency[];
         String alphabet;
         Histogram(String alphabet)
              this.alphabet=alphabet;
              frequency=new int[alphabet.length()];
         void scan(String message)
              for(int i=0;i<message.length;i++)
                   frequncy[alphabet.IndexOf(message.charAt(i))]++;
         void setfrequency(int frequency[])
              for(int i=0;i<alphabet.length;i++)
              this.frequency=frequency[i];
         double entropy()
              int total=0;
              double probablity;
              log2=Math.log(2.0);
              for(int i=0;i<alphabet.length;i++)
                   total+=freguency[i];

  • When I AirPrint it only does small portions of the page. How do I get it to print the whole page?

    When I AirPrint The printer only prints a portion of the page.  How do I get it to print the whole page.

    It would help if you stated what printer you are using and what application you are doing the printing from. Also, what are you printing?

  • I am trying to print a pdf document from an electronic journal at my school, and i can only get it to print what is on the screen at the time i hit print.  How do i get it to print the whole document?

    how do i get it to print the whole article?  i don't seem to have a problem printing from my old windows laptop

    melbaby_3 wrote:
    when I clicked on your link and hit print, all pages were there!
    That suggests there's no problem with Safari or Quartz, the PDF rendering engine used by Safari, Preview, and other Mac applications.
    When I'm in the database and have the article open that I want to print, I click on the "full text in pdf" link and it opens in another safari window.
    Does the PDF in this other Safari window have all the pages? If yes, why don't you print from this window?
    It's very difficult to tell what might be going on if you don't give very specific details.
    For instance, in many reference databases, full-text articles are not free. You have to pay to view them, either article by article, or by subscription. Your school may have such a subscription, but, if it does, you probably need to access the database through the portal, web site, or facility provided by your school (your school's librarian should be able to help you with that). If you don't, the database has no way of knowing you have a right to view the full text, and may give you just a preview or the article's first page.
    Another possibility is that the database provides full-text PDFs in a format not compatible with Quartz, which may be able to render only the first page. But, in such a case, I'd expect Safari to print blank pages. If that's the case, you need to save the PDF on your hard disk and open it with Adobe Reader (Preview wouldn't work).
    There are other possibilities, but these two seem to me the most likely.
    Would I have to save it in preview first
    You should save the PDF on your hard disk from Safari. (I think you should do this anyway, just in case you need to refer to the article again later.) Instead of just clicking the  "'full text in pdf' link", press and hold Control, then click. This should give you a contextual menu; if the link points to a PDF file, you should see the commans "Save Linked File to 'Downloads'" and "Save Linked File As…". Use either, save the file, then, in Finder, double-click on it. Preview should open it.
    It is possible that the link is not to a PDF file, but to a script which fetches that PDF file for you. In that case, it's pointless to download it. Click on it, and then, if the PDF viewing window opens in Safari, move the cursor towards the centre of the bottom of the window. A bar with commands should appear; one of them will download the file to your Downloads folder.

  • Not printing the whole page

    the printer is not printing the whole page it is cutting the right side
    hp photosmart 7520

    My HP Photosmart model 5520 is only printing part of a page.

  • How to print the whole JFrame

    Hi,
    I got this code somewhere from the net.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    /** A simple utility class that lets you very simply print
    *  an arbitrary component. Just pass the component to the
    *  PrintUtilities.printComponent. The component you want to
    *  print doesn't need a print method and doesn't have to
    *  implement any interface or do anything special at all.
    *  <P>
    *  If you are going to be printing many times, it is marginally more
    *  efficient to first do the following:
    *  <PRE>
    *    PrintUtilities printHelper = new PrintUtilities(theComponent);
    *  </PRE>
    *  then later do printHelper.print(). But this is a very tiny
    *  difference, so in most cases just do the simpler
    *  PrintUtilities.printComponent(componentToBePrinted).
    *  7/99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
    *  May be freely used or adapted.
    public class PrintUtilities implements Printable {
      private JFrame componentToBePrinted;
      public static void printComponent(JFrame c) {
        new PrintUtilities(c).print();
      public PrintUtilities(JFrame componentToBePrinted) {
        this.componentToBePrinted = componentToBePrinted;
      public void print() {
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPrintable(this);
        if (printJob.printDialog())
          try {
            printJob.print();
          } catch(PrinterException pe) {
            System.out.println("Error printing: " + pe);
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
        if (pageIndex > 0) {
          return(NO_SUCH_PAGE);
        } else {
          Graphics2D g2d = (Graphics2D)g;
          g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
          disableDoubleBuffering(componentToBePrinted);
          componentToBePrinted.paint(g2d);
          enableDoubleBuffering(componentToBePrinted);
          return(PAGE_EXISTS);
      /** The speed and quality of printing suffers dramatically if
       *  any of the containers have double buffering turned on.
       *  So this turns if off globally.
       *  @see enableDoubleBuffering
      public static void disableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(false);
      /** Re-enables double buffering globally. */
      public static void enableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(true);
    }From my main class (where the JFrame resides), the print() method is invoked to print the JFrame. However, when it is printed, it only prints the top left part of the JFrame, not the whole JFrame. Can anyone help please? Thank you very much.

    public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
        if (pageIndex > 0) {
          return(NO_SUCH_PAGE);
        else {
          Graphics2D g2d = (Graphics2D)g;     
          g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
           double xScale = 0.63;
           double yScale = 0.56;
          g2d.scale(xScale, yScale);
          disableDoubleBuffering(componentToBePrinted);     
          componentToBePrinted.paint(g2d);
          enableDoubleBuffering(componentToBePrinted);
          return(PAGE_EXISTS);
      }Hi all,
    Alright I managed to scale it to print the whole JFrame. But another problem surfaces. When I select draft quality printing, it doesn't print the whole JFrame. Other printing qualities (standard, high) do print the whole JFrame. I am really puzzled. Anyone has any clue?
    And I have an unrelated question to this topic. How do I set a JTextField so that when I click on it the first time, it highlights its content? Have to work around with the mouselistener?
    Thank you.

  • How can I print contiguous rows on a Numbers spreadsheet without having to print the whole spreadsheet page?

    I frequently have a need to print a portion of a spreadsheet for a presentation, but find that I have to print the whole spreadsheet page to obtain the information I want.  When I was using Microsoft Excel I could highlight a section of a spreadsheet and print only the highlighted rows.  Is there some way that I can do this in Numbers?  Help will be appreciated.

    Numbers differs significantly from Excel in the print paradigm.  If you enable Print View using the menu item "View > Show Print View", you will see exactly how each page will print.
    A Numbers document contains Sheet.
    Sheets contains a canvas, on which you place tables, graphics, text, and media.  The canvas is continuous and is divided into pages at print time.
    If you want to print just a portion of a table, select the area, copy, the open the Application Preview, select the menu item "File > New From Clipboard"
    Then print

  • When I try to print a photo from iphoto, I select the photo, click print and the preview shows there is a lot of the photo cut off.  It also prints this way.  How can I print the whole picture?

    When I try to print a photo from iphoto, I click print and the preview shows a lot of the photo cut off.  It also prints this way.  How can I print the whole photo?

    After selecting File > Print, a pop-up window should appear. Select "Customize" and this should take you back into a panel within iPhoto. Towards the bottom, you should see an option for "Layout". Select this option and choose the correct photo orientation.
    Hope this helps!

  • Freight cost condition for the whole purchase order (Header relation)

    Maybe you could help me out with the following difficulty regarding freight costs for the whole purchase orders from the mass maintenance transaction MEK1 for pricing conditions.
    I try to have one freight condition for the whole purchase order.
    For instance, I maintained in the transaction MEK1 for the condition FRA1 the key combination vendor and purchasing organization (table 44) and entered an absolute value of X EUR.
    Unfortunately this condition will not pulled as header costs in the purchase order, because I would have had defined an access sequence in the condition type, but this is not allowed for header conditions in general.
    Do you have any workaround to maintain an item condition, which works like a header condition, so that I am allowed to have an access sequence and be able to maintain MEK1?
    Any comments and help are very welcome.
    Many thanks in advance
    Sabrina

    Hi,
    Fright and discount conditions are called supplement conditon type and  they are always matained with main condition type.
    Please check PB00 condition type in m/06 transaction. You will find pricing procedure assinged as RM0002 to PB00 condtion type.
    So you can maintain fra1 and other supplement condtions in main condtion only in MEk1 trasnaction.
    By selecting the line item and then shift + F7 you can maintain fright or discount condtions for PB00 condition types with out having access sequence for supplement condtion types.
    Regards,
    shailesh Mackwan

  • File Print on the list item doesn't print the whole content in IE8

    Hi,
    I have this issue happened on my customer side. Their IE version is 8.0.7600.16385.
    By using this version of IE to do a file > print of a list item with long html content, the html content will get chop off. Refer to the screenshots.
    Print Preview
    List Item
    HTML code in the "Content" column
    <div class="ExternalClass1BFFAF9C72F744C7899695B11ADC69F3"><p>Printing Issue Simulation</p>
    <p><img alt="XXX.jpg" src="XXX.jpg" style="margin: 5px; width: 647px; height: 1000px"/><br/><br/>2012-06-18 17:29:47 - Processor architecture is (9)<br/>2012-06-18 17:29:47 - Reading the following string value/name...<br/>2012-06-18 17:29:47 - Common Startup<br/>2012-06-18 17:29:47 - from the following registry location...<br/>2012-06-18 17:29:47 - SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders<br/>2012-06-18 17:29:47 - The value is... <br/>2012-06-18 17:29:47 - C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup<br/>2012-06-18 17:29:47 - Trying to remove the startup task if there is any.<br/>2012-06-18 17:29:47 - C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\SharePointServerPreparationToolStartup_0FF1CE14-0000-0000-0000-000000000000.cmd<br/>2012-06-18 17:29:47 - Error: Startup task doesn&#39;t exist. This is not a continuation after a restart.<br/>2012-06-18 17:29:47 - Analyzing the following command line argument:<br/>2012-06-18 17:29:47 - /unattended<br/>2012-06-18 17:29:47 - Unattended installation<br/>2012-06-18 17:29:47 - Analyzing the following command line argument:</p>
    <p><img alt="XXX.jpg" src="XXX.jpg" style="margin: 5px; width: 647px; height: 1000px"/></p>
    <p>&#160;</p>
    <p>​</p></div>
    If file > print is done in higher IE version, it can be printed out nicely.
    Is there a way to fix this issue as customer side may not able to upgrade to the higher IE version? e.g. CSS
    Thanks in advance.
    jingzo (^_^)

    Hi,
    According to your description, my understanding is that the print function of IE8 doesnot print the whole content of SharePoint list item.
    For troubleshooting your issue, please turn off Protection Mode for the IE8.
    You can refer to the thread:
    https://social.technet.microsoft.com/Forums/en-US/b8ab8f65-9b27-4a90-9323-0ca5b7e4466e/print-preview-print-of-web-pages-doesnt-work-in-ie8?forum=w7itproperf
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How do I stop it printing 1/6 (bottom RH corner) of page 6 times instead of printing the whole page?

    When I print a PDF downloaded from the internet it chops the bottom RH corner of the page and reproduces it 6x (2x across the page and 3x down the page), instead of printing the whole page, this is driving me mad, does anyone know how to stop it? I have ticked Print as Image and Multiple Pages is NOT selected....

    suzbat,
    I have ticked Print as Image and Multiple Pages is NOT selected....
    Are you using the desktop version of Adobe Reader on a Mac computer?  What is the version of your Adobe Reader?
    You posted the question on the Adobe Reader for iOS forum.  But Adobe Reader for iOS does not offer the print options like "Print as Image", "Multiple Pages".

  • Print the whole site with one button

    Hi All
    This may sound like a stupid question, but
    I wonder if someone can help me, is there a way of having a
    button that would print the whole site - rather than separate html
    pages. - without having/using a pdf file .
    Regards
    Lorna17

    No.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "lorna17" <[email protected]> wrote in
    message
    news:eci4gv$h7l$[email protected]..
    > Hi All
    > This may sound like a stupid question, but
    >
    > I wonder if someone can help me, is there a way of
    having a button that
    > would
    > print the whole site - rather than separate html pages.
    - without
    > having/using
    > a pdf file .
    >
    > Regards
    > Lorna17
    >
    >
    >
    >
    >
    >

  • What do I do when my printer will not print the whole page of something I wirelessly send to print

    What exactly do I need to do when my printer will not print the whole page of a job i send to it wireless?

    hi there,
    could you provide the community with a little more information to help narrow troubleshooting? Things like your printer model and your operating system help out a lot.
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Want to print the whole month with or without overtime for each employee

    Hi,
    I have Oracle forms/reports10g R2, Below query returns employee overtime correctly but I want to add the whole month with it in simple words if one employee have overtime for five days in a month I want the query to return the whole month including five overtime days for each employee and let say if we have ten employees query return whole month for each employee either he have or overtime or not how can I implement this in report it becomes agony for me, anyone please suggest a solution.
    Thanks and regards, Khawar.
    ---Query---
    select o.ot_date , o.start_dt_time as start_time, o.end_dt_time as end_time, o.ot_details, et.holiday, et.staff_id, e.staff_name, e.desig
    from overtime o, emp_ot et, employee e
    where o.complain_no = et.complain_no
    and o.inc_type_code = et.inc_type_code
    and et.staff_id = e.staff_id
    order by 1, 2, 3, e.staff_id

    Hi Michael,
    Thanks for reply, I think I didn't explain as I should, I want to print Overtime report for each employee let say employee A123 did overtime for five days in DEC than what I want is to print report for employee A123 for the whole month means when I print report blank cell should come where A123 don't have data (I mean other 25/26 days).
    The structure of tables are as
    SQL> desc overtime
    Name Null? Type
    COMPLAIN_NO NOT NULL NUMBER(5)
    OT_DATE NOT NULL DATE
    START_DT_TIME NOT NULL DATE
    INC_REF_NO NUMBER(5)
    END_DT_TIME NOT NULL DATE
    INC_TYPE_CODE NOT NULL VARCHAR2(10)
    DISTRICT_CODE VARCHAR2(6)
    BUSBAR_VOL VARCHAR2(5)
    OT_DETAILS VARCHAR2(2000)
    SQL> desc EMP_OT
    Name Null? Type
    STAFF_ID NOT NULL VARCHAR2(8)
    COMPLAIN_NO NOT NULL NUMBER(5)
    INC_TYPE_CODE NOT NULL VARCHAR2(10)
    HOLIDAY NUMBER
    Each employee associated with primary key i.e COMPLAIN_NO and INC_TYPE_CODE
    in each OVERTIME table record we may have more than one employee in EMP_OT table.
    above detail may clear my query.
    Thanks and Regards,
    Khawar.

  • How to Print the whole view content from a button on the View Layout

    Dear All,
    Good Morning All
    I am New to WebDynPro.Solution needed Urgently
    How to take print whole view content(lay out) in
    webdynpro application.i.e whatever it may be tablecontent or label or inputfield .
    Could you send the coded part briefly step by step from the beginning itself i.e
    i put the button in the view lay out below the printed parts(label or inputfield) name like show preview .
    Now my Question is what should i write in show preview function to take the print in label fields in the webdynpro view lay out
    B'cos i am new to webdynpro.Help me
    Thx in advance
    Regards
    Dhinakar

    Web Dynpro by default does not provide the option of printing the view content.
    However still you have a round about way of doing it. Create the an html page similar to the Web Dynpro page. Store the code into a String variable.
    String html="<html> ....<scripts>window.print()</scripts></html>";
    bytes[] source=html.getBytes();
    try{
    byte[] b=new byte[1];
    IWDCachedWebResource res=WDWebResource.getWebResource(b,WDWebResourceType.HTML);
    String url=res.getURL();
    }catch (WDURLException e) {
              // TODO: handle exception
    Now open the url in a new window and that would print the content of the html page.
    Regards,
    Noufal

Maybe you are looking for

  • Error while updating customer data through IDOC.

    hi all, I am using the function module "IDOC_INPUT_DEBITOR" to update the customer master data but i was getting an error "editing was terminated".Please help to solve this problem. regards, Suresh.

  • PO print ouu

    Hi friends We have created a PO and release effected and we have taken a printout.After a week we tried to take printout of the same PO but the output is in redlight when i go to processing log " No print-relevant changes to document 450.........8 ex

  • HT5721 How do you find size of i photo files?

    Im trying to find out the size of files in iphoto?

  • Record Check / Aggregation when loading to infocube

    When pushing daily data to a infocube, summarized by week, I am having inconsistent results in the cube. For example, in a week, if I have 5 separate records in the ODS with the same plant, variety, and week, but each on a different day, those 5 reco

  • BAPI_OUTB_DELIVERY_CONFIRM_DEC problem in change quantity again?

    Dear all, I used BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI . And I also want to change the delivered quantity. But the bapi did not work . What's the problem? DATA: BAPI_Z05DOGI_DELIVERY LIKE BAPIOBDLVHDRCON-DELIV_NUMB , BAPI_Z05DOGI_HEADER_DATA LIKE BAP