Print a table directly

Hi to all,
I have an output table and I want to print it directly to a paper, how can I do?
Thank you very much,
Antonio

Hi,
At present(till SP9) the print functionality is not supported in webdynpro.
If you try implemnting the page in PDK it can be done by running the javascript window.print()
Regards
Noufal

Similar Messages

  • Print RDLC Report Directly to Printer with SubReports!

    I am currently printing a report directly to the default printer using the code from this link. 
    http://msdn.AddHandler
    ReportViewer1.LocalReport.SubreportProcessing, AddressOf SubreportProcessingEventHandler
    and this code:
    Public Sub SubreportProcessingEventHandler(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
    Dim zrpt = e.ReportPath
    Select Case zrpt
    Case "WOPartsSubReport"
    Dim ds1 As New WOPartsSubReportDataSet
    Dim da1 As New WOPartsSubReportDataSetTableAdapters.wopartsTableAdapter
    da1.Fill(ds1.woparts)
    e.DataSources.Add(New ReportDataSource("DataSet1", ds1.Tables("woparts")))
    Case "WOLaborSubReport"
    Dim ds2 As New WOLaborSubReportDataSet
    Dim da2 As New WOLaborSubReportDataSetTableAdapters.wolaborTableAdapter
    da2.Fill(ds2.wolabor)
    e.DataSources.Add(New ReportDataSource("DataSet1", ds2.Tables("wolabor")))
    Case "WOLockoutSubReport"
    Dim ds As New WOLockOutSubReportDataSet
    Dim da As New WOLockOutSubReportDataSetTableAdapters.wolockTableAdapter
    da.Fill(ds.wolock)
    e.DataSources.Add(New ReportDataSource("DataSet1", ds.Tables("wolock")))
    End Select
    End Sub
    But now that I am NOT using a reportviewer how can I still get the subreports to work and still print directly to the printer?  Where would I put the code to do that?
    Thanks,
    Stacy

    Hi Stacy,
    Sorry for the delay.
    It’s Christian that I have involved to help on this issue. Maybe the issue requires a more in-depth level of support. Alternatively, you could contact Microsoft Customer Support Services (CSS) via telephone so that a dedicated Support Professional can assist
    you in a more efficient manner. Please understand that contacting phone support will be a charged call, but it will be free if this is a product issue. To obtain the phone numbers for specific technology request please take a look at the web site listed below:
    http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS
    Another option would be creating a thread on our Connect site:
    http://connect.microsoft.com/sql.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Orarrp can't print pdf file directly to printer

    oracle remote print utility (orarrp) can't print pdf file directly to printer.
    we expect orarrp utility can handle ".rrpa" file (i.e. pdf file generated on the application server) by directly print the file to the client's printer, i.e. invoke the acrobat reader on the client side, display the the printer selection dialogue, after confirmation print the pdf file, then the acrobat reader close automatically nicely.
    However we are disappointed as the acrobat reader startup and display the pdf file content but does not print and does not close.
    After testing the problem several times, there are some findings:-
    Finding (A):-
    (a) for the success of direct printing of pdf file, a physical path must be provided; we have tried 2 methods:
    1) using drag & drop to copy the pdf file directly to the browser
    2) open pdf file in the browser directly using browser menu-->File-->Open.
    (b) for the failure of direct printing, a virtual path is involved and we have also tried 2 methods:
    1) when web.show_document() is used
    2) enter the url to the URL bar of the browser,
    eg. http://appsvr.com:7777/report/test_printout/APPSVR1094707.rrpa (this is a virtual path/url)
    Finding (B):-
    (a)when the physical path is used, a temporary pdf file is generated in the same directory where the rrpa file exists in the application server,
    e.g. in application server: d:/printout/yyy.pdf is generated for d:/printout/xxx.rrpa when direct print occurs
    (b) however when the virtual path is used, there is no such temp "pdf" file generated and direct print failed.
    May be when virtual path is used, orarrp utility don't know where to generate the temp "pdf" so direct print doesn't occur.
    So, anyone has similar experience or further queries or has solutions, please join.
    Thanks for your attention.

    Hi,
    It is really late to give response this post. But still who ever refering to this post for the same issue this solution is useful for achieving same in background:
    Even same can be used in smartforms, for getting spool request in PDF format as well which will decrease the size of file when printing in SAP printer.
    ct_tline is PDF output:
    DATA: lv_pdfsource TYPE xstring.
    FIELD-SYMBOLS:<p> TYPE x. " <p> type any.
    LOOP AT ct_tline INTO cs_tline.
      ASSIGN cs_tline TO <p> CASTING TYPE x.
      CONCATENATE lv_pdfsource <p> INTO lv_pdfsource IN BYTE MODE.
    ENDLOOP.
    * ->Create spool request in PDF format
    CALL FUNCTION 'ADS_CREATE_PDF_SPOOLJOB'
      EXPORTING
        printer  = 'LOCL'            "Printer name supporting PDF device type
    *   DEST     =
        pages    = 1
        pdf_data = lv_pdfsource        "XSTRING internal table
    *   NAME     =
    *   SUFFIX1  =
    *   SUFFIX2  =
    *   COPIES   =
    *   PRIO     =
        IMMEDIATE_PRINT         = 'X'
    *   AUTO_DELETE             =
    *   TITLELINE               =
    *   RECEIVER =
    *   DIVISION =
    *   AUTHORITY               =
    *   LIFETIME = '0'
    * IMPORTING
    *   SPOOLID  =
    * EXCEPTIONS
    *   NO_DATA  = 1
    *   NOT_PDF  = 2
    *   WRONG_DEVTYPE           = 3
    *   OPERATION_FAILED        = 4
    *   CANNOT_WRITE_FILE       = 5
    *   DEVICE_MISSING          = 6
    *   NO_SUCH_DEVICE          = 7
    *   OTHERS   = 8
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

  • How to print the report directly without previewing (report viewer) using c# windows application

    Hi,
    Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
    can fill this problem.
    To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
    csCashInvoiceCal csCashCal; --Crystal report name .rpt
    dsCsReceipt dsCs; --created dataset
    DataTable u;
    DataRow s;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private System.Windows.Forms.PrintDialog printDialog1;
    ParameterValues paramValue;
    ParameterDiscreteValue discreteValue;
    ParameterFieldDefinition fieldDefinition;
    private void btnPrint_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt2();
    print2();
    csCashCal.Close();
    this.Cursor = Cursors.Default;
    private void loadReceipt2()
    dsCs = new dsCsReceipt(); --created dataset
    u = dsCs.Tables.Add("DtCsReceipt");
    u.Columns.Add("Qty", Type.GetType("System.String"));
    u.Columns.Add("UOM", Type.GetType("System.String"));
    u.Columns.Add("Description", Type.GetType("System.String"));
    u.Columns.Add("UnitPrice", Type.GetType("System.String"));
    u.Columns.Add("Discount", Type.GetType("System.String"));
    u.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
    s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    s["Discount"] = "";
    s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    u.Rows.Add(s);
    catch (Exception) { }
    csCashCal = new csCashInvoiceCal();
    csCashCal.SetDataSource(dsCs.Tables[1]);
    //csCashCal.Refresh();
    loadParameter2();
    private void loadParameter2()
    ParameterFieldDefinitions paramFieldDefinitions;
    paramValue = new ParameterValues();
    discreteValue = new ParameterDiscreteValue();
    paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
    discreteValue.Value = date;
    fieldDefinition = paramFieldDefinitions["Date"];
    commonParam();
    discreteValue.Value = txtcsno.Text;
    fieldDefinition = paramFieldDefinitions["InvoiceNo"];
    commonParam();
    discreteValue.Value = txtNameTo.Text;
    fieldDefinition = paramFieldDefinitions["CustomerName"];
    commonParam();
    discreteValue.Value = txtAdd.Text;
    fieldDefinition = paramFieldDefinitions["CustomerAddress"];
    commonParam();
    ------other parameters----
    private void commonParam()
    paramValue.Clear();
    paramValue.Add(discreteValue);
    fieldDefinition.ApplyCurrentValues(paramValue);
    private void print2()
    using (printDocument1 = new System.Drawing.Printing.PrintDocument())
    using (this.printDialog1 = new PrintDialog())
    //this.printDialog1.UseEXDialog = true;
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if (dr == DialogResult.OK)
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    try
    csCashCal.PrintOptions.PrinterName = PrinterName;
    csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
    printcount++;
    //saveCountPrint();
    catch (Exception err)
    MessageBox.Show(err.ToString());
    This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
    But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
    with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
    So here is my code so far which I don't know what's next:
    private void button2_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt3();
    //print3();
    this.Cursor = Cursors.Default;
    ReportParameter[] parameter = new ReportParameter[11];
    private void loadParameter3()
    parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
    parameter[1] = new ReportParameter("Date", date);
    parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
    parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
    parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
    parameter[5] = new ReportParameter("Agent", agent);
    parameter[6] = new ReportParameter("Discount", "Discount: ");
    parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
    parameter[8] = new ReportParameter("TotalSales", rdtotal);
    parameter[9] = new ReportParameter("Tax", rdtax);
    parameter[10] = new ReportParameter("TotalAmount", rdnet);
    private void loadReceipt3()
    DataSet dsrs = new DataSet();
    DataTable dtrs = new DataTable();
    DataRow drs;
    dtrs.Columns.Add("Qty", Type.GetType("System.String"));
    dtrs.Columns.Add("UOM", Type.GetType("System.String"));
    dtrs.Columns.Add("Description", Type.GetType("System.String"));
    dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
    dtrs.Columns.Add("Discount", Type.GetType("System.String"));
    dtrs.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    drs = dtrs.NewRow();
    drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    drs["Discount"] = "";
    drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    dtrs.Rows.Add(s);
    catch (Exception) { }
    int addtlRow = 7;
    if (addtlRow > (count - 1))
    addtlRow = addtlRow - (count - 1);
    for (int i = 0; i < addtlRow; i++)
    dtrs.Rows.Add();
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    localreport.Refresh();
    //what's next....
    So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
    Anyway I'm using VS 2010 with sql server 2012 express.
    You're help will be greatly appreciated.
    Thank you,
    Hardz

    After some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
    with my code above and helps solve my question.
    Here's the continuation of the code above:
    private void loadReceipt3()
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    Export(localreport);
    print4();
    private IList<Stream> m_streams;
    private int m_currentPageIndex;
    private void Export(LocalReport report)
    string deviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
    out warnings);
    foreach (Stream stream in m_streams)
    stream.Position = 0;
    private void print4()
    if (m_streams == null || m_streams.Count == 0)
    throw new Exception("Error: no stream to print.");
    PrintDocument printDoc = new PrintDocument();
    PrintDialog printDlg = new PrintDialog();
    printDlg.Document = printDoc;
    DialogResult dr = printDlg.ShowDialog();
    if (dr == DialogResult.OK)
    if (!printDoc.PrinterSettings.IsValid)
    throw new Exception("Error: cannot find the default printer.");
    else
    printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
    m_currentPageIndex = 0;
    printDoc.Print();
    Dispose();
    public void Dispose()
    if (m_streams != null)
    foreach (Stream stream in m_streams)
    stream.Close();
    m_streams = null;
    private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
    Stream stream = new FileStream(name + "." + fileNameExtension,
    FileMode.Create);
    m_streams.Add(stream);
    return stream;
    private void PrintPage(object sender, PrintPageEventArgs ev)
    Metafile pageImage = new
    Metafile(m_streams[m_currentPageIndex]);
    // Adjust rectangular area with printer margins.
    Rectangle adjustedRect = new Rectangle(
    ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
    ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
    ev.PageBounds.Width,
    ev.PageBounds.Height);
    // Draw a white background for the report
    ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
    // Draw the report content
    ev.Graphics.DrawImage(pageImage, adjustedRect);
    // Prepare for the next page. Make sure we haven't hit the end.
    m_currentPageIndex++;
    ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
    Thank you very much for this wonderful tutorial. :)

  • Print PDF file directly to store printer

    Hi Gurus,
    Having not found a solution, we think we need help from you. We have searched forums and google but have not found adequate solutions.
    We are a retailer having different stores. Our main office is using SAP. Each store has its printer and defined in our SAP system. We want to print PDF files directly to store printer using SAP . How should we do that ? We think there are 2 steps:
    1) Upload PDF files from network directory into SAP (We done it, no problem)
    2) Having now PDF files in internal tables, how should we proceed to print PDF files using store printers?
         Please note that we do not want to use CL_GUI_PDFVIEWER since we do not want to display the PDF and having the obligation to choose the print option from dialog and also we do not want to call Adobe OLE object  to print
    Any answer would be appreciated
    Thank you very much

    Hi,
    It is really late to give response this post. But still who ever refering to this post for the same issue this solution is useful for achieving same in background:
    Even same can be used in smartforms, for getting spool request in PDF format as well which will decrease the size of file when printing in SAP printer.
    ct_tline is PDF output:
    DATA: lv_pdfsource TYPE xstring.
    FIELD-SYMBOLS:<p> TYPE x. " <p> type any.
    LOOP AT ct_tline INTO cs_tline.
      ASSIGN cs_tline TO <p> CASTING TYPE x.
      CONCATENATE lv_pdfsource <p> INTO lv_pdfsource IN BYTE MODE.
    ENDLOOP.
    * ->Create spool request in PDF format
    CALL FUNCTION 'ADS_CREATE_PDF_SPOOLJOB'
      EXPORTING
        printer  = 'LOCL'            "Printer name supporting PDF device type
    *   DEST     =
        pages    = 1
        pdf_data = lv_pdfsource        "XSTRING internal table
    *   NAME     =
    *   SUFFIX1  =
    *   SUFFIX2  =
    *   COPIES   =
    *   PRIO     =
        IMMEDIATE_PRINT         = 'X'
    *   AUTO_DELETE             =
    *   TITLELINE               =
    *   RECEIVER =
    *   DIVISION =
    *   AUTHORITY               =
    *   LIFETIME = '0'
    * IMPORTING
    *   SPOOLID  =
    * EXCEPTIONS
    *   NO_DATA  = 1
    *   NOT_PDF  = 2
    *   WRONG_DEVTYPE           = 3
    *   OPERATION_FAILED        = 4
    *   CANNOT_WRITE_FILE       = 5
    *   DEVICE_MISSING          = 6
    *   NO_SUCH_DEVICE          = 7
    *   OTHERS   = 8
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

  • Printing of table data with a button

    I have an application that creates a table with data from a database. I would like to put a button at the top of the page that would allow the user to print the table in paginated format. Does anyone have any sample code or directions as to how I could accomplish this. As an FYI, I am new to JSP and Creator studio.

    Example code in the button is like this (I use oracle 10g, and call stored procedure to get the result set. In your case, maybe you just use simple view/table, give the connection to the jasper, and let the jasper query the table).
    public String printButton_action() {
            FacesContext myFaces = FacesContext.getCurrentInstance() ;
            ServletContext svContext = (ServletContext) myFaces.getExternalContext().getContext();
            HttpServletResponse response = (HttpServletResponse) myFaces.getExternalContext().getResponse();
            File reportFile = new File(svContext.getRealPath("/report.jasper"));
            if (reportFile.exists()) {
                ResultSet rs;
                Integer totrec;
                // prepare parameters, connection... etc.
                try{
                    java.sql.Date bdate = new java.sql.Date(begCalendar.getSelectedDate().getTime());
                    java.sql.Date edate = new java.sql.Date(endCalendar.getSelectedDate().getTime());
                    Connection con = getSessionBean1().getOracleconnection();
                    CallableStatement stmt = con.prepareCall("{call webcrpackage.TtcHarian(?,?,?,?)}");
                    stmt.setDate(1, bdate);
                    stmt.setDate(2, edate);
                    stmt.registerOutParameter(3, OracleTypes.NUMBER); //REF CURSOR
                    stmt.registerOutParameter(4, OracleTypes.CURSOR); //REF CURSOR
                    stmt.execute();
                    rs = (ResultSet) stmt.getObject(4);
                    totrec = Integer.valueOf(stmt.getBigDecimal(3).intValue());
                } catch(Exception e) {
                    error(e.getMessage());
                    return null;
                try {
                    JRResultSetDataSource dsource = new JRResultSetDataSource(rs) ;
                    // execute jasper
                    byte[] bytes = null ;
                    // prepare jasper parameter!!
                    Map parameters = new HashMap();
                    parameters.put("comname", getSessionBean1().getComname());
                    parameters.put("comdivision", getSessionBean1().getComdivision());
                    parameters.put("begdate", begCalendar.getSelectedDate());
                    parameters.put("enddate", endCalendar.getSelectedDate());
                    parameters.put("totalrecord", totrec);
                    bytes = JasperRunManager.runReportToPdf(reportFile.getPath(), parameters, dsource);
                    response.setContentType("application/pdf");
                    ServletOutputStream ouputStream = response.getOutputStream();
                    ouputStream.write(bytes, 0, bytes.length);
                    ouputStream.flush();
                    ouputStream.close();
                } catch (Exception ex) {
                    error(ex.getMessage());
                    return null;
            } else {
                error("Report file doesn't exist!");
            return null;
        }Long journey, search this forum on how to deploy jasper in jsc, etc..etc.
    Hope that helps.

  • Print internal table

    Hi ,
    I have created a view with a table inside. This table is bound to a node that contains data from a service
    call.
    The view is embeded in the window and the data in the table can be displayed on the screen. I would like
    to print this table. How do I code this? Please give me suggestions.
    ps. I don't want to display in ALV format.
    Thanks,
    AS.

    Hi Thomas,
    I have created a view and a popup window. In this view context, I created a node that is bound to SFPPRIP structure.
    I have user to enter output device (DEST) .
    I don't know how to declear it_message and print_options to make the method PRINT to work.
    Could you look at the code below and give me some suggestions on the input for the print method?
    method GET_PRINT_PARAM .
    * get print input
      data: context_node type ref to if_wd_context_node,
              elem_print type ref to if_wd_context_element,
              stru_print type if_componentcontroller=>element_printing,
              item_dest like stru_print-dest.
      context_node = wd_context->get_child_node( name = 'PRINTINT' ).
      elem_print = context_node->get_element( ).
      elem_print->get_attribute(
        exporting
          name = 'DEST'
        importing
          value = item_dest ).
    *   fill the internal table
    data: elem_sflightinfo type ref to if_wd_context_element,
             stru_sflightinfo type table of if_componentcontroller=>element_sflightinfo initial size 0,
             w_itab           like line of stru_sflightinfo.
         context_node = wd_context->get_child_node( name = 'SFLIGHTINFO').
         select * from sflight
          into corresponding fields of table stru_sflightinfo.
    * BIND table to context node flighttab
      call method context_node->bind_table
        exporting
          new_items = stru_sflightinfo.
    * for print method
    data: it_out type ref to data,
            it_message type ref to CL_BSP_MESSAGES. "I know it is wrong, but what should I use?
    get reference of stru_sflightinfo into it_out.
      wd_this->print(
    *   col_def =                              " tableviewcontroltab
        itab     =  it_out                      " ref to data
    *   iterator =                               " ref to if_htmlb_tableview_iterator
        messages =   it_message      " ref to cl_bsp_messages(wrong. but what to pass?)
        print_options = item_dest     " sfpprip  (I know it is wrong, but don't know what to pass?)
    endmethod.
    PRINT method
    method PRINT .
      FIELD-SYMBOLS: <tab> TYPE table.
      ASSIGN itab->* TO <tab>.
    ****This sample uses the new ALV Object Model - Only available in WebAS 640+
    ****It will have to be changed (perhaps to use field catalogs and REUSE_ALV)
    ****in WebAS 620
      DATA: table   TYPE REF TO cl_salv_table.
      DATA: print_parameters TYPE pri_params,
            valid_flag(1) TYPE c.
    ****Convert the Input Print Parameters (Designed for Adobe Forms)
    ****Into the ABAP List format
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = print_options-authority
          copies                 = print_options-copies
          cover_page             = print_options-cover
          data_set               = print_options-dataset
          department             = print_options-division
          destination            = print_options-dest
          expiration             = print_options-lifetime
          immediately            = print_options-reqimm
          layout                 = 'X_65_255'
          list_name              = print_options-suffix2
          list_text              = print_options-covtitle
          new_list_id            = print_options-reqnew
          no_dialog              = abap_true
          receiver               = print_options-receiver
          release                = print_options-reqdel
        IMPORTING
          out_parameters         = print_parameters
          valid                  = valid_flag
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc = 0  OR valid_flag NE abap_true.
        messages->add_message2( condition = 'print'
                                message = 'Invalid Print Parameters'(e01) ).
        RETURN.
      ENDIF.
    ****Start List Processing with our Print Parameters
      NEW-PAGE PRINT ON PARAMETERS print_parameters
                        NO DIALOG.
    ****Create the ALV Object Model
      DATA: salv_msg TYPE REF TO cx_salv_msg.
      DATA: error_string TYPE string.
      TRY.
          cl_salv_table=>factory(
            EXPORTING
              list_display = abap_true
            IMPORTING
              r_salv_table = table
            CHANGING
              t_table      = <tab> ).
        CATCH cx_salv_msg INTO salv_msg.
          messages->add_message_from_exception( condition = 'print'
                                                exception = salv_msg ).
          EXIT.
      ENDTRY.
    ****Process the Column Definitions
      DATA: columns TYPE REF TO cl_salv_columns_table.
    ****Get a reference to the columns object and set the optimize width.
      columns = table->get_columns( ).
      columns->set_optimize( abap_false ).
      DATA: l_col_def TYPE tableviewcontroltab.
      DATA: iterator_error TYPE REF TO cx_sy_dyn_call_illegal_method.
    ****We have an iterator Class - Process it and get a columun defintion table
      IF col_def  IS INITIAL AND
         iterator IS NOT INITIAL.
        DATA: p_overwrites TYPE tableviewoverwritetab.
        TRY.
            iterator->get_column_definitions(
                 EXPORTING
                   p_tableview_id = 'itab'
                 CHANGING
                   p_column_definitions = l_col_def
                   p_overwrites         = p_overwrites ).
          CATCH cx_sy_dyn_call_illegal_method INTO iterator_error.
            messages->add_message_from_exception( condition = 'print'
                                                  exception = iterator_error ).
            EXIT.
        ENDTRY.
    *****User supplied a column definition table directly - us it
      ELSEIF col_def  IS NOT INITIAL.
        l_col_def = col_def.
      ENDIF.
    ****Adjust our column definition (otherwise know as Field Catalog) by the
    ****Iterator or Column Dfinition table.
      IF l_col_def IS NOT INITIAL.
        DATA: scrtext_l TYPE scrtext_l,
              scrtext_m TYPE scrtext_m,
              scrtext_s TYPE scrtext_s,
              tooltip   TYPE lvc_tip.
        DATA: col TYPE salv_t_column_ref.
        FIELD-SYMBOLS: <wa_col> LIKE LINE OF col,
                       <wa_col_def> LIKE LINE OF l_col_def.
    ****Get a listing of all columns
        col = columns->get( ).
    ****Loop through all the columsn
        LOOP AT col ASSIGNING <wa_col>.
    ****Read to see if the current columns is in our Iterator
          READ TABLE l_col_def ASSIGNING <wa_col_def>
                WITH KEY columnname = <wa_col>-columnname.
          IF sy-subrc = 0.
    ****Field is in the iterator - set it visible.
            <wa_col>-r_column->set_visible( abap_true ).
    ****Is there an override title in the Iterator - if yes
    ****use it for all the column headers of the output
            IF <wa_col_def>-title IS NOT INITIAL.
              scrtext_l = <wa_col_def>-title.
              scrtext_m = <wa_col_def>-title.
              scrtext_s = <wa_col_def>-title.
              <wa_col>-r_column->set_long_text( scrtext_l ).
              <wa_col>-r_column->set_medium_text( scrtext_m ).
              <wa_col>-r_column->set_short_text( scrtext_s ).
            ENDIF.
    ****Is there an override tooltip in the Interator - if yes
    ****ues it for the tooltip of the output (actually meaningless
    ****for only printing - but hey you never know what you might
    ****use this for in the future :)
            IF <wa_col_def>-tooltipheader IS NOT INITIAL.
              tooltip = <wa_col_def>-tooltipheader.
              <wa_col>-r_column->set_tooltip( tooltip ).
            ENDIF.
          ELSE.
    ****Field is not in the Iterator - Hide it in the output
            <wa_col>-r_column->set_visible( abap_false ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ****Set the ALV to display (forces printing in the Dark = background or BSP)
      table->display( ).
      NEW-PAGE PRINT OFF.
      messages->add_message2( condition   = 'print'
                              message     = 'Print Output is complete'(i01)
                              messagetype = 'I' ).
    endmethod.
    Your help is greatly appreciated.
    AS.
    Edited by: Anna  Smith on Dec 18, 2008 4:25 PM

  • Print BW report directly

    Hi Experts,
    we want to print a Report directly after clicking on print version. We don't want to first open the pdf file and then click another time on print. Is there any solution?
    The best solution would be, that we print automatically the report on our local printer after confirming the filter variables.
    Thanks for your help
    Sebastian

    There should be a javascript command, something like window.print, which you could put in the onLoad function of the page.
    The problem here is that it doesn't print in the nice PDF version.
    Cheers,
    Andrew

  • Print a report directly to the printer

    I need to print a report directly to the printer in Oracle Forms and Report 11g without a preview in the browser

    Hello,
    <p>You can use this Java Bean</p>
    Francois

  • Error when printing a PDF direct from SAP archive

    Hi together,
    I try to print a PDF direct from SAP archive and I got the error ""C:\Program files\Adobe\Acrobat 7.0\reader\AcroRd.exe" /p /h" not found. In the internet I found several topics which describe this way to print a PDF without open the Acrobat Reader.
    The customizing for document management (Local application) seems o.k. If I remove in the registry the parameters /h /p for print, Acrobat Reader will open and show the document if I use the print button in SAP.
    Have anybody an idea what the reason is?
    Thank you.
    Regards
    Thomas

    The rundll32 error seems to have disappeared.  Until this morning I had both this error and the rundll32.  All other types of docs open fine.  This one will open if saved to the desktop first, but not from Outlook.

  • Can we enter data in any standard table directly through custom form??

    Dear All,
    Can we enter data in any standard table directly through custom form??
    I have create custom form in R.12. I want to insert data in quality standard table directly through custom form. Need experts guideline.
    Awaiting regards,

    Hi,
    Can we enter data in any standard table directly through custom form??
    I have create custom form in R.12. I want to insert data in quality standard table directly through custom form. Need experts guideline.
    Awaiting regards,
    I would not recommend touching the standard tables at all unless you are being guided by the SR. For a record to be in the standard table it should go through series of validations based on the what operation you are performing and some times datas are dependent upon the other tables, and also some times the same records are hit to so many other tables simultaneously.
    Therefore I would not recommend this brother.
    Thanks &
    Best Regards,

  • Print ALV report Directly - without the Print Parameter POPUP

    Hai All,
    I want to print a ALV directly to the printer without the Print Paramter POPUP.
    I passed on IS_PRINT parameters in the FM 'REUSE_ALV_LIST_DISPLAY'.
    But still i am getting the popup.
    How to do this.
    It is urgent .
    Kindly help me solving this.
    Vikki.

    Hi,
    i have passed IS_Print-Print = 'X'.
    But even after that i am getting the print parameter popup.
    IS there any other way to handle this. TO SUPPRESS THE PRINT PARAMETER POPUP.
    Please guide me.
    Waiting for ur replies.
    Vikki.

  • ADOBE: How to print a table only on uneven pages and a text on the back?

    Hi, I am looking for a clear document on how to use pagination and the Odd and Even pages.
    We need to print a table over several pages, but the table should only appear on Odd pages. The even pages should be skipped. On the even (back) pages we need to print "Terms and Conditions". Is that possible? Can it be done without scripting?
    We are using ADOBE version 8.1
    In the file properties, double sided is switched on, and version set to 8.1 and higher.
    I created two Master pages, a FrontPage with ContentArea1and a BackPage with ContentArea2.
    FrontPage is used for uneven pages, BackPage is used for the even pages. The masterpages are printed correctly (alternating properly).
    One page was created for the table, totals etc.:
    ITEMS: contains item data (table with header and footer). Place is "On Odd Page". After "Goto page BackPage", so there is always one page with the text. And if the table needs to be paginated it goes to BackPage with overflow leader "Conditions".
    What should happen is that on the front pages the item table is printed. If there are too many lines then it should continue on page number 3 then 5 etc. All the even pages should display text only.
    What actually happens is that the item table also gets printed in the content area for the Condition text...
    The best I could achieve is to decrease the contenta area of the back page. To force pagination. But still it prints one table record in the (very small) content area of the back page before paginating to the next page (front page again). If it only would not do that, it would be fine.
    Cheers,
    Edwin.

    Fixed it... After a lot of creating, deleting, playing around with pagination and the inevitable cursing...
    I have created 5 pages:
    1. FirstPage
         - Odd/Even: Odd (Front) Pages
         - Placement: First page (In page set)
    2. FrontPage (For Odd pages)
         - Odd/Even: Odd/Front Pages
         - Placement: Rest of Pages
    3. BackPage (For Even pages)
         - Odd/Even: Even (Back) Pages
         - Placement: Rest of Pages
    4. LastPage
         - Odd/Even: No Odd/Even Restrictions
         - Placement: Last page (In page set)
    5. DummyPage
         - Odd/Even: Blank pages
    The 'Terms and conditions' are located on the BackPage and LastPage (as a text).
    The table that is printed is (of course) located on a normal page (flowed subform).
    Pagination tab: Placement = Following previous, and After = "Continue filling parent". No overflow... Basically, it's all default.
    The table lines will now start on the first page and if there are more lines than can be printed on this page, it will continue in the next content area. That will be on the FrontPage.
    The trick is that each master page must have a content area (mandatory). Except for Blank pages, but these cannot be used... Blank pages would only be used once, after the first page.
    What I discovered is that you can drag a content area away from the Master page and attach it to a different master page.
    Logically, if there is no content area on a page, then data cannot be printed there. So, I created a Dummypage. On this page I dumped the content areas from the LastPage and the BackPage. As a result, content cannot be printed anymore on the back of pages. Only the standard text (a text field) is printed there. When the data from the table is overflowing, it will automatically overflow from the FirstPage to the next content area. Which is located on the FrontPages only.
    The DummyPage is NOT used anywhere.
    The result is that the records can only be printed on the content areas that exist on the First and Front pages. The back pages are now skipped.
    Duplex printing is now working correctly, and the text is printed on the back of all the pages.
    Cheers,
    Edwin.

  • Printing PDF report directly to printer, not using orarrp utility

    The orarrp utility works only with Windows machines and it
    requires installation on both the client machines and servers to
    support. We need a more general solution.
    Adobe has a java application/applet/javabean (and support
    classes) to view PDF, and it is easy to write a java driver
    which can be used in place of the orarrp utility. However,
    Adobe's Java Viewer is extremely slow, does not produce quality
    output, and is explicitly not supported by Adobe.
    My question then relates to Reports. When the Report server
    returns a PDF in the Previewer, I'm expecting the JINITIATOR,
    used by Forms, is also used to support the Report frame and
    functionality, including eventual printing. If this is the case,
    is there not a set of classes, downloaded with Jinitiator, which
    support the fonts, and printing of PDF to locally attached
    printers?
    And if so, shouldn't we, in Java, be able to make use of these
    classes and their APIs to print PDF files directly to locally
    attached printers without the need for Previewing first?

    within a forms trigger:
    1. generate the report
    2. copy from iAS to local
    like: webutil_file_transfer.url_to_client()
    3. print.exe /d:printer filename (for windows OS)

  • Error - Printing a report directly to printer

    Hi,
    i'm using oracle forms 9i and i'm trying to print a report directly to printer. I using the code above:
    SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_SERVER,GetReportTnsName);
    IF ReportDesType = 'CACHE' THEN
    SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESTYPE,CACHE);
    ReportServerJob:=RUN_REPORT_OBJECT(ReportId, PList);
    rep_status := report_object_status(ReportServerJob);
    IF rep_status=’FINISHED’ THEN
    JobId := substr(ReportServerJob,length(GetReportTnsName)+2,length(ReportServerJob));
    WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'||JobId||'?server='||GetReportTnsName,'_blank');
    ELSE
    message ('Error’);
    END IF;
    -- logic for sending report directly to printer
    ELSIF ReportDesType = 'PRINTER' then
    SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESTYPE,PRINTER);
    SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESNAME,:parameter.p_print);
    ReportServerJob:=RUN_REPORT_OBJECT(ReportId, PList);
    rep_status := report_object_status(ReportServerJob);
    IF rep_status=’FINISHED’ THEN
    message ('Report sent to printer successfully');
    ELSE
    --handle errors
    message ('Error’);
    END IF;
    end if ;
    i get this error :
    REP-50157: Erro no envio do ficheiro para a impressora lp65. Sair com o código de erro 64
    NEED HELP !!
    Regards,

    The printer has to be known on the server where the Reports service runs.
    Also, the user who runs the Reports service has to have access to that printer. If you are running on Windows, Reports Service runs as Local system by default. Change that to a real (domain) user, who has access to the printer.

Maybe you are looking for

  • In iOS7 it writes from its own

    Sometimes my ipad mini which runs iOS 7.0.3 starts pressing random pieces of the screen from its own! 

  • Exception while starting OC4J 10g

    When ever I start OC4J, I get the following exception thrown. Althopugh my container starts. Also when I try to connect using admin_client.jar for deploying any CMP EJB, it fails to connect. I am using JDK 1.4.2 even when I invoke with JDev 10g java

  • Error when I open the new help in FCP7

    I get a error when I open the new help in FCP7: The Help Library requires JavaScript. If JavaScript is not enabled, you will not be able to view all the content.

  • Questions about web console

    1. how many web console server I can place in one management group? 2. if a web console server is on serverA.company.com, can I configure the server so that users can connect to the web console at http://scom2012r2.company.com/OperationsManager inste

  • How to change key on runtime form in application server

    How it is possible reconfigure key on froms in application server ???? List Values on Client = key "F9" List values on Application = key "CTRL + L" and so on..... can j have the same on client version like apllication ??? Thank You !!