$ie.ExecWb(6, 2)

I save webpages to xps files by using $ie.ExecWb(6, 2) function in PS. each of them is saved to a multi-page xps file. The script ok for long time. then I found that one of them started to save only the first page of the
webpage. other webpages are saved ok. any idea why? Thanks

As I understand it, calling that function with those arguments should behave just as if you'd selected File -> Print, then clicked OK without changing anything. You could try doing that manually for the page in question, and see if you can figure
out why it's behaving differently than the others.

Similar Messages

  • Save webpage to xps file by using $ie.ExecWB function

    when save webpage to xps file by using $ie.ExecWB(6,2) function, it only saves the first page. It seems when print to xps file, it has default selection of "Page 1" or "Current Page". Is there a way to change to save "All Pages" to
    xps file? Thanks

    Hi Ian3,
    I haven't found a good way to save all webpages to a file, however, to use the method ExecWB, please refer to this article:
    Printing from Internet Explorer
    I hope this helps.

  • Print html document from presentation server with no intervention of user

    Hello,
    I have been able to create HTML output for my smartform.
    They are saved on my machine.
    I need to print these HTML outputs as a part of process without intervention of the user.
    Is it possible?
    I have tried method 'EXECWB' of 'cl_gui_html_viewer', but that gets fired only on some action and shows the Print dialog for the selection of printer.
    It would be great if anyone can help me with us.
    Thanks
    Mona

    PDL -- thank you for your reply.
    What you gave me did spawn the print dialog allowing me to select a printer. However, when the document printed, the number of pages in the document was correct but the pages were empty except for the page x of y along the top and the name of the document along the bottom. Have you seen this before and do you know how to correct? Also, how do you suppress the info across the top and bottom of the report from printing?
    Thanks

  • Avoid Printer selection Dialogue box when printing Crystal report in JAVA

    Hi i am calling crystal report in my servlet using Report Client Document SDK, now i want to print the report directly to the default printer set without selecting the printer from the select printer dialogue box. In other words want to avoid the select printer dialogue box from appearing . Can any body suggest me how do i do this .
    Any suggestions appreciated.

    In javascripting the code is
    function Print()
    if (document.all)
    WebBrowser1.ExecWB(6, -1) //use 6, 1 to prompt the print dialog or 6, 6 to omit it;
    WebBrowser1.outerHTML = "";
    <object ID="WebBrowser1" WIDTH="0" HEIGHT="0"
    CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
    But the above code does not work in windows XP SP2.... and i cannot restrict my clients OS.
    where as C#,ASP.NET  provides the functionality to print directly to printer as
    The ReportDocument class provides PrintToPrinter method that may be used to print a CR direct to the printer. If no printer is selected, the default printer will be used to send the printing pages to.
    The PrintToPrinter method takes four parameters.
    nCopies : Indicates the number of copies to print.
    collated : Indicates whether to collate the pages.
    startPageN : Indicates the first page to print.
    endPageN : Indicates the last page to print.
    The following steps will guide you to achieve the same:
    Add crystal report (.cr) file to your ASP.NET application.
    Add a report instance on the page level.
    Dim report As MyReport = New MyReport
    Populate reports data on Page_Init 
      ' Get data in a DataSet or DataTable
            Dim ds As DataSet = GetData()
            ' Fill report with the data
         report.SetDataSource(ds)
    Print Report
    report.PrintToPrinter(1, False, 0, 0)
    If you wish to print certain page range, change last two parameters From to To page number.
    If you want to set page margins, you need to create a PageMargin object and set PrintOptions of the ReportDocument.
    The following code sets page margins and printer name:
    Dim margins As PageMargins =  Report.PrintOptions.PageMargins
       margins.bottomMargin = 200
       margins.leftMargin = 200
       margins.rightMargin = 50
       margins.topMargin = 100
       Report.PrintOptions.ApplyPageMargins(margins)
       ' Select the printer name
       Report.PrintOptions.PrinterName = printerName
    Thn Why not a java SDK for Crystal report can provide such a functionality...
    Edited by: rtabassum on Mar 25, 2010 6:34 AM
    Edited by: rtabassum on Mar 25, 2010 6:36 AM
    Edited by: rtabassum on Mar 25, 2010 6:42 AM

  • How to print an html report?

    In a Test UUT's execution, the process model generates and saves a html report. How can add steps to the process model to print the report each time? I'm thinking maybe somehow using an ActiveX call to open IE and then print (1 step or 2?), but I'm a newbie to ActiveX and don't know what server/class/method to use.
    ==============================================
    David Kaufman
    LabVIEW Certified Developer
    ==============================================

    Using Microsoft Word could be a good solution if you actually have it installed in the computer. In some cases, you may not want to have that application installed in the production floor for any reason (licenses, memory space...).
    I am attaching an example that shows how to print the report automatically after testing a UUT using ActiveX to communicate with Internet Explorer. It is more likely that any machine would have this application installed since it occupies a lot less memory space and it ships with any Windows OS. Furthermore, there are just 3 steps that do the trick!
    The attached zip file contains a modified sequential model. The entry points ("Single Step" and “Test UUTs”) have one new step that calls the "Print Report" sequence (also added to the sequential model). This new sequence has ActiveX steps that call two methods of the “Internet Explorer (IwebBrowser2)”object class exported by the “Microsoft Internet Controls” automation server. These two methods are:
    1) Navigate. Allows you to select the html file to load.
    2) ExecWB with the first parameter (cmdid) set to "OLECMDID_PRINT" (prints the loaded file) and the second parameter (cmdexecopt) set to OLECMDEXECOPT_DONTPROMPTUSER" (don’t show the print dialog).
    (For more information about these methods, please refer to the MSDN Library)
    The example will print the report after each UUT is tested. The "Print Report" step is set to run just if the Report Generation is not disabled (see its preconditions).
    This is what you need to do to run the example:
    1) Copy the contents of the zip file to: \Components\User\Models\TestStandModels
    2) Make sure that the “User Components Directoty” is checked in the Search Directories.
    3) Run any sequence using Single Pass or Test UUTs.
    WARNING: There is a known issue when using the printing capabilities of the Internet Explorer. This is what is explained in the MSDN library:
    "... Internet Explorer prints in the background. This means that the print processing is actually completed asynchronously in a separate thread.Upon return from ExecWB, the print processing may continue for several seconds or even up to a minute or two based on various factors such as the size of the content and how busy your system is currently. The problem is that if you start a print job and then destroy the WebBrowser or close your application before the background thread finishes processing, the thread will abandon its work and the page may not be completely printed..."
    There are 2 approaches to work around this problem:
    1) Use a delay before destroying the WebBrowser reference (which is done in the cleanup step group of the "Print Report" sequence in the example). This is the approached used in the example. The third step in the “Print Report” sequence is a Wait step. The step is currently set to wait for 3 seconds which has worked for me for almost any report sizes.
    2)In Internet Explorer 5 you can work around this problem by sinking the OnAfterPrint event. If you have started a print job, then you should wait to release the WebBrowser until after this event has been received. If you choose this approach you could use the ActiveX events capabilities of Labview or Visual Basic to create a small program detecting this event. There's a simple sample code provided in the MSDN library for VB.
    Enjoy!
    Attachments:
    SequentialModel.seq ‏169 KB

  • Unable to Create a CL_GUI_HTML_VIEWER

    Hi to all..
           I'm not able to create an CL_GUI_HTML_VIEWER ... after executing everything it just shows the button and textbox along..
    This is my code..
    TYPE-POOLS: icon.
    CLASS cls_event_handler DEFINITION DEFERRED.
    G L O B A L V A R I A B L E S
    DATA:
    ok_code LIKE sy-ucomm,
    Container for html vieaer
    go_html_container TYPE REF TO cl_gui_custom_container,
    HTML viewer
    go_htmlviewer TYPE REF TO cl_gui_html_viewer,
    Container for toolbar
    go_toolbar_container TYPE REF TO cl_gui_custom_container,
    SAP Toolbar
    go_toolbar TYPE REF TO cl_gui_toolbar,
    Event handler for toolbar
    go_event_handler TYPE REF TO cls_event_handler,
    Variable for URL text field on screen 100
    g_screen100_url_text(255) TYPE c,
    g_screen100_display_url(255) TYPE c.
    I N T E R N A L T A B L E S
    DATA:
    Table for button group
    gi_button_group TYPE ttb_button,
    Table for registration of events. Note that a TYPE REF
    to cls_event_handler must be created before you can
    reference types cntl_simple_events and cntl_simple_event.
    gi_events TYPE cntl_simple_events,
    Workspace for table gi_events
    g_event TYPE cntl_simple_event.
    START-OF-SELECTION.
    SET SCREEN '100'.
    CLASS cls_event_handler DEFINITION
    Handles events for the toolbar an the HTML viewer
    CLASS cls_event_handler DEFINITION.
    PUBLIC SECTION.
    METHODS:
    Handles method function_selected for the toolbar control
    on_function_selected
    FOR EVENT function_selected OF cl_gui_toolbar
    IMPORTING fcode,
    Handles method navigate_complete for the HTML viewer control
    on_navigate_complete
    FOR EVENT navigate_complete OF cl_gui_html_viewer
    IMPORTING url.
    ENDCLASS.
    CLASS cls_event_handler IMPLEMENTATION.
    Handles method function_selected for the toolbar control
    METHOD on_function_selected.
    CASE fcode.
    WHEN 'BACK'.
    CALL METHOD go_htmlviewer->go_back
    EXCEPTIONS cntl_error = 1.
    WHEN 'FORWARD'.
    CALL METHOD go_htmlviewer->go_forward
    EXCEPTIONS cntl_error = 1.
    WHEN 'STOP'.
    CALL METHOD go_htmlviewer->stop
    EXCEPTIONS cntl_error = 1.
    WHEN 'REFRESH'.
    CALL METHOD go_htmlviewer->do_refresh
    EXCEPTIONS cntl_error = 1.
    WHEN 'HOME'.
    CALL METHOD go_htmlviewer->go_home
    EXCEPTIONS cntl_error = 1.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    Handles method navigate_complete for the HTML viewer control
    METHOD on_navigate_complete.
    Display current URL in a textfield on the screen
    g_screen100_display_url = url.
    ENDMETHOD.
    ENDCLASS.
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    IF go_html_container IS INITIAL.
    Create container for HTML viewer
    CREATE OBJECT go_html_container
    EXPORTING
    container_name = 'HTML_CONTAINER'.
    Create HTML viewer
    CREATE OBJECT go_htmlviewer
    EXPORTING parent = go_html_container.
    Create container for toolbar
    CREATE OBJECT go_toolbar_container
    EXPORTING
    container_name = 'TOOLBAR_CONTAINER'.
    Create toolbar
    CREATE OBJECT go_toolbar
    EXPORTING
    parent = go_toolbar_container.
    Add buttons to the toolbar
    PERFORM add_button_group.
    Create event table. The event ID must be found in the
    documentation of the specific control
    CLEAR g_event.
    REFRESH gi_events.
    g_event-eventid = go_toolbar->m_id_function_selected.
    g_event-appl_event = 'X'. "This is an application event
    APPEND g_event TO gi_events.
    g_event-eventid = go_htmlviewer->m_id_navigate_complete.
    APPEND g_event TO gi_events.
    Use the events table to register events for the control
    CALL METHOD go_toolbar->set_registered_events
    EXPORTING
    events = gi_events.
    CALL METHOD go_htmlviewer->set_registered_events
    EXPORTING
    events = gi_events.
    Create event handlers
    CREATE OBJECT go_event_handler.
    SET HANDLER go_event_handler->on_function_selected
    FOR go_toolbar.
    SET HANDLER go_event_handler->on_navigate_complete
    FOR go_htmlviewer.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    Handles the pushbutton for goto url
    CASE ok_code.
    WHEN 'GOTOURL'.
    PERFORM goto_url.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form add_button_group
    Adds a button group to the toolbar
    FORM add_button_group.
    BACK botton
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'BACK'
    icon = icon_arrow_left
    butn_type = cntb_btype_button
    text = ''
    quickinfo = 'Go back'
    CHANGING
    data_table = gi_button_group.
    FORWARD botton
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'FORWARD'
    icon = icon_arrow_right
    butn_type = cntb_btype_button
    text = ''
    quickinfo = 'Go forward'
    CHANGING
    data_table = gi_button_group.
    STOP button
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'STOP'
    icon = icon_breakpoint
    butn_type = cntb_btype_button
    text = ''
    quickinfo = 'Stop'
    CHANGING
    data_table = gi_button_group.
    REFRESH button
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'REFRESH'
    icon = icon_refresh
    butn_type = cntb_btype_button
    text = ''
    quickinfo = 'Refresh'
    CHANGING
    data_table = gi_button_group.
    Home button
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'HOME'
    icon = ''
    butn_type = cntb_btype_button
    text = 'Home'
    quickinfo = 'Home'
    CHANGING
    data_table = gi_button_group.
    Separator
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'SEP1'
    icon = ' '
    butn_type = cntb_btype_sep
    CHANGING
    data_table = gi_button_group.
    EXIT button
    CALL METHOD cl_gui_toolbar=>fill_buttons_data_table
    EXPORTING
    fcode = 'EXIT'
    icon = icon_close
    butn_type = cntb_btype_button
    text = ''
    quickinfo = 'Close porgram'
    CHANGING
    data_table = gi_button_group.
    Add button group to toolbar
    CALL METHOD go_toolbar->add_button_group
    EXPORTING data_table = gi_button_group.
    ENDFORM. " add_button_group
    *& Form goto_url
    Calls method SHOW_URL to navigate to an URL
    FORM goto_url.
    CALL METHOD go_htmlviewer->show_url
    EXPORTING url = g_screen100_url_text.
    ENDFORM. " goto_url
    please provide a solution
    With regards
    aahbha

    yes you can do that.
    place a button in the status bar and enter the following code if the button is pressed
    call method html_control->execwb
                      exporting cmd_id  = html_control->wb_cmdid_print
                      exceptions cntl_error = 1        .
        if sy-subrc <> 0.
          message e003(cnht) raising html_print_error.
        endif.
    Hope this helps.
    Regards
    Raja

  • Embed word document in C# winforms, Have to disable/hide Quick access toolbar.

    Hi Team,
    Currently i am embedding a word document in winforms. I need to disble/hide/remove the quick access toolbar from the word, i was tried in different ways like below ways in C#  but it's not working .
    With oDocument.Application.CommandBars("Standard")'disable the standard toolbar
          .Enabled = False
          .Visible = False
     End With
    WebBrowser1.ExecWB OLECMDID_HIDETOOLBARS, OLECMDEXECOPT_DONTPROMPTUSER'toggle between "reviewing" and "standard"
    toolbar
    End Sub
    Any help would be highly appreciate.Thanks.

    Hi Ravindra
    The code you're trying to use is for the old "toolbar" GUI that was discontinued in the Office applications starting with version 2007. CommandBars is still present in the object model and does interact with the new "Ribbon" interface
    to a certain extent, but it's NOT used to affect visibility.
    The Ribbon GUI, introduced in Office 2007, is defined by "Ribbon XML" and cannot be affected by code running from outside the application interface, nor by code running in-process that's not part of the same "container" as defines the
    Ribbon XML.
    From the screen shot you provide, it looks like you want to work with a specific type of document ("Custom Letter")? If yes, then it would be best for you to create a template that contains the Ribbon definition you want to provide for that type
    of document. In order to suppress the QAT you need to use the "startFromScratch" command for the customUI which also means that the Ribbon XML must define the ENTIRE Ribbon interface you want to provide to your users.
    You'll find the basics about customizing the Ribbon in the three-part article "for developers". You can find links to that, as well as to other information concerning the Ribbon,here:
    https://social.msdn.microsoft.com/Forums/office/en-US/ba8c9d0b-7312-4503-8167-f2ef86f17435/information-on-the-office-fluent-ui-ribbon-for-developers?forum=officegeneral
    Cindy Meister, VSTO/Word MVP,
    my blog

  • How to print a JSP page ?

    HI,
    I need to implement a printing functionality on a JSP page.
    So I have a JSP page and there wud be a button on top of it.There is one table containing around 20 columns. So I jusst want to print that table out and nothng else from page.
    So when user clicks on Print button , whcih will open a new window and show the contents to be printed.Once user click Print bbutton on this second newly opened window it shud print.
    Can any one provide pointer to any link or help to implement this?
    Thanks in advance..
    javaardentfan

    You can do it using javascript, see the following JSP code and follow it.
    put the code in DIV tags that you do not wat to see in the final print
    previewRpt() javascript method does all the work..
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%-- jsf:pagecode language="java" location="/JavaSource/pagecode/jsp/reports/OrderEditDetailsPopup.java" --%><%-- /jsf:pagecode --%>
    <%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="../../theme/Master.css" rel="stylesheet" type="text/css">
    <LINK rel="stylesheet" href="../../theme/EOPS.css" type="text/css">
    <LINK REL="stylesheet" TYPE="text/css" HREF="../../theme/menus.css" />
    <TITLE>Option Order Edit Details</TITLE>
    <LINK rel="stylesheet" type="text/css" href="../../theme/stylesheet.css"
         title="Style">
    <script language="javascript">
    function previewRpt() {
         document.getElementById("buttonsArea").style.display="none";
         document.getElementById("buttonArea").style.display="none";
         if (document.all) {
              var OLECMDID = 7;
              /* OLECMDID values:
              * 6 - print * 7 - print preview * 1 - open window * 4 - Save As
              var PROMPT = 1; // 2 DONTPROMPTUSER
              var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
              document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
              WebBrowser1.ExecWB(OLECMDID, PROMPT);
              WebBrowser1.outerHTML = "";     
              window.PrintArea.innerHTML = "<div class='formlabel'>Please Click the X on the window to close!</div>"
              window.close();
         } else {
              window.print();
    </script>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    </HEAD>
    <f:view>
         <BODY onload="javascript:scrollTop=0"><hx:scriptCollector id="scriptCollector1">
              <div style="visibility:hidden">
                   <hx:commandExButton type="button" value="Close"
                   styleClass="custbutton1" id="button2">
              </hx:commandExButton>
              </div>
              <div id="buttonsArea">
                   <table cellpadding="0" cellspacing="0" border="0" width="100%">
                   <tr>
                   <td></td>
                   <td align="right">
                        <input type="image" src="../../images/printRest.gif" title="Print This report"
                                  onclick="previewRpt()"/>
                   </td>
                   </tr>
                   </table>
              </div>
              <TABLE width="100%">
                   <TR><TD align="center"> <h3>Order Edit Detail Report</h3></TD></TR>
                   <TR><TD align="center"> Order Id # <c:out value="${ORDER_HEADER_ID}"></c:out> Details</TD></TR>
              </TABLE>
         <BR>
              <TABLE class="grooved" border="1" cellpadding="0" cellspacing="0">
                   <TR><TD class="formlabel">Account</TD><TD><c:out value="${PART1.ACCOUNT}"> </c:out></TD></TR>
                   <TR><TD class="formlabel">Order Status</TD><TD><c:out value="${PART1.ORDER_STATUS}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Order Number</TD><TD><c:out value="${PART1.ORDER_NO}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Sales Rep #</TD><TD><c:out value="${PART1.SALES_REP_NO}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Order Date</TD><TD><c:out value="${PART1.ORDER_DATE}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">PO</TD><TD><c:out value="${PART1.PO}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">School or Institution Name</TD><TD><c:out value="${PART1.SCHOOL_NAME}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">District or Parent Institution Name</TD><TD><c:out value="${PART1.DISTRICT_NAME}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Account Name</TD><TD><c:out value="${PART1.ACCOUNT_NAME}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Attention</TD><TD><c:out value="${PART1.ATTENTION}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Miscellaneous</TD><TD><c:out value="${PART1.MISC}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Street Address</TD><TD><c:out value="${PART1.STREET}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">City</TD><TD><c:out value="${PART1.CITY}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">State</TD><TD><c:out value="${PART1.STATE}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Zip</TD><TD><c:out value="${PART1.ZIP}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Contact Phone</TD><TD><c:out value="${PART1.CONTACT_PH}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Contact Fax</TD><TD><c:out value="${PART1.CONTACT_FAX}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Pack By</TD><TD><c:out value="${PART1.PACK_BY}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Ship On Date</TD><TD><c:out value="${PART1.SHIP_ON_DATE}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Order Ship Via</TD><TD><c:out value="${PART1.ORDER_SHIP_VIA}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Customer Default Ship Via</TD><TD><c:out value="${PART1.CUSTOMER_DEFAULT_SHIP_VIA}"></c:out> </TD></TR>
                   <TR><TD class="formlabel">Warehouse</TD><TD><c:out value="${PART1.WAREHOUSE}"></c:out> </TD></TR>
              </TABLE>
              <BR>
              <c:if test="${PART2_FOUND eq 'YES'}">
              <h:form styleClass="form" id="form1"><h:dataTable border="1" cellpadding="2" cellspacing="0" columnClasses="columnClass1" headerClass="headerClass" footerClass="footerClass" rowClasses="rowClass1" styleClass="dataTable" id="table1" value="#{PART2}" var="rpt" rows="40">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText id="text1" styleClass="outputText" value="Product Title"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text11" value="#{rpt.PRODUCT_TITLE}"></h:outputText>
                   </h:column>
                   <h:column id="column2">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Product Code" id="text2"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text12" value="#{rpt.PRODUCT_CODE}"></h:outputText>
                   </h:column>
                   <h:column id="column3">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Order QTY" id="text3"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text13" value="#{rpt.ORDER_QTY}"></h:outputText>
                   </h:column>
                   <h:column id="column4">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Customer Service QTY" id="text4"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text14" value="#{rpt.CUSTOMER_SERVICE_QTY}"></h:outputText>
                   </h:column>
                   <h:column id="column5">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Sales Admin QTY" id="text5"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text15" value="#{rpt.SALES_ADMIN_QTY}"></h:outputText>
                   </h:column>
                   <h:column id="column7">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Product Price" id="text7"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text17" value="#{rpt.PRODUCT_PRICE}"></h:outputText>
                   </h:column>
                   <h:column id="column8">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Extended Cost" id="text8"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text18" value="#{rpt.EXTENDED_COST}"></h:outputText>
                   </h:column>
                   <h:column id="column9">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Gratis" id="text9"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text19" value="#{rpt.GRATIS}"></h:outputText>
                   </h:column>
                   <h:column id="column10">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="Series" id="text10"></h:outputText>
                        </f:facet>
                        <h:outputText styleClass="outputText" id="text20" value="#{rpt.SERIES}"></h:outputText>
                   </h:column>
                        <f:facet name="footer">
                             <hx:panelBox styleClass="panelBox" id="box1">
                                       <hx:pagerDeluxe styleClass="pagerDeluxe" id="deluxe1" />
                                  </hx:panelBox>
                        </f:facet>
                   </h:dataTable></h:form>
              </c:if>
              <br>
              <div id="buttonArea">     
              <center><hx:commandExButton type="button" value="Close"
                   onclick="window.close();" styleClass="custbutton1" id="button1">
              </hx:commandExButton></center>
              </div>
              <BR>
         </hx:scriptCollector></BODY>
    </f:view>
    <HEAD>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    </HEAD>
    </HTML>

  • Internet Explorer OLE2 problems

    I am trying to control Internet Explorer 6 using OLE2 from forms to open and print an html document. I can open the html document, but I cannot print. Here is the code:
    declare
    webhandle ole2.obj_type;
    args OLE2.LIST_TYPE;
    begin
    webhandle := OLE2.CREATE_OBJ('InternetExplorer.APPLICATION');
    --Open
    OLE2.set_property(webhandle,'Visible','True');
    args := OLE2.create_arglist;
    OLE2.add_arg(args,'c:\test.htm');
    OLE2.invoke(webhandle,'Navigate',args);
    OLE2.destroy_arglist(args);
    --Print
    OLE2.INVOKE(webhandle,'FilePrint');
    OLE2.release_obj(webhandle);
    end;
    Does anyone know how to print from IE6 using OLE2? Also, does anyone know how to select which printer to print to as well?

    Hi Kirk,
    I think Robin is right. Take a look at MSDN (msdn.microsoft.com). It says that you should use ExecWB method to do that.
    For example:
    webhandle := OLE2.CREATE_OBJ('InternetExplorer.APPLICATION');
    OLE2.set_property(webhandle,'Visible','True');
    -- Open the MSDN :)
    args := OLE2.create_arglist;
    OLE2.add_arg(args,
    'http://msdn.microsoft.com/library' ||
    '/default.asp?url=/workshop/browser/' ||
    'webbrowser/reference/methods/execwb.asp' );
    OLE2.invoke(webhandle,'Navigate',args);
    OLE2.destroy_arglist(args);
    -- Wait while document isn't loaded
    WHILE OLE2.GET_NUM_PROPERTY( webhandle,'Busy' ) <> 0 LOOP
    Message( 'Document hasn''t been loaded yet.' );
    END LOOP;
    Message( 'Document is loaded!' );
    Message( ' ', NO_ACKNOWLEDGE );
    -- Print preview.
    -- Of course, you could use OLECMDID_PRINT = 6 for
    -- printing instead of calling printpreview window.
    args := OLE2.create_arglist;
    OLE2.add_arg(args, 7 ); -- OLECMDID_PRINTPREVIEW
    OLE2.add_arg(args, 0 ); -- OLECMDEXECOPT_DODEFAULT
    OLE2.INVOKE(webhandle,'ExecWB', args);
    OLE2.destroy_arglist(args);
    OLE2.release_obj(webhandle);
    P.S. If you need number values of constants such as OLECMDID_PRINT, let me know your e-mail. I'll send it to you. My e-mail is [email protected]

  • How to automate the Acrobat Reader plugin in Internet Explorer

    Hi,
    I have been trying to figure out how to automate the Acrobat Reader plugin in Internet Explorer. My goal is to find a way to allow users of our web application to print PDFs to the default printer without having to go through the plugin's GUI. Our application includes a browser helper component, and I had hoped it would be possible to use the IWebBrowser2 interface's get_Document() method to get at some sort of interface to the plugin (as is possible for, say, a Word document hosted in Internet Explorer) and then use this to print the document. However, this does not work: get_Document(), when called on an IWebBrowser2 instance with a PDF loaded, returns E_NOINTERFACE. I also tried calling the IWebBrowser2 interface's ExecWB() method with OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, and PRINT_DONTBOTHERUSER, and printed a blank page rather than the PDF.
    Is it possible to do what I am attempting? Like I said, my core goal is to print a PDF from within Internet Explorer without requiring user interaction. I'd appreciate any suggestions as to how I might accomplish this -- it doesn't _have_ to be by automating the plugin (maybe that is a the wrong approach... though it sure would be nice if the plugin provided access to its object model via IWebBrowser2->get_Document()).
    Thanks in Advance,
    Steve Mckinney
    Senior Developer
    Paxon Corporation

    IF that were entirely true, then the whole purpose of this thread is moot (automating printing server side). It is possible to load the file via URLs using the following html code:
    "<"body>
    "<"OBJECT id="pdf"
    type="application/pdf"
    width=800
    height=600 >
    "<"param name="src" value="http://localhost/pdfs/vorder_nc.pdf"/>
    "<"/OBJECT>
    "<"script language="JavaScript">
    function waitLoad()
    setTimeout("printFile()",2000);
    function printFile()
    var objPdf = document.getElementById('pdf');
    objPdf.PrintAllFit(1);
    "<"/script>
    "<"/body>
    So, if I used php or some other scripting language on the server to fill in the name of the pdf, I can load it via a URL, wait a couple of seconds for it to load, and then print it without user interaction. I wish that the LoadFile method would load a URL so that when it returns, I know it is loaded and I don't have to put faith in a timer that may not be enough for a large file.
    This is the situation I'm in. This way works but I don't like the timer. I'd rather have the plugin let me know when it's loaded. Is there another method that can help me do what I want?
    Thank again.

  • Where is the body of the report text in TS 3.0 located?

    I'm trying to print a report after a step failure without ending the sequence.

    Hi
    It really depends on where you trying to print the report from and the type of report?
    If you are trying to print the report from the Operator Interfaces and you are using the new UI controls then you can post a custom UI Msg to the OI when you want to print the report and when you handle this custom UI message then you can invoke the PrintReport Method of the reportView control.
    If you want to print the report in the sequence editor then you will need to use Active X steps to invoke Internet Explorer.
    You will need to call 2 methods of �Internet Explorer (IwebBrowser2)�object class exported by the �Microsoft Internet Controls� automation server. These two methods are:
    1) Navigate. Allows you to select the html file to load.
    2) ExecWB with th
    e first parameter (cmdid) set to "OLECMDID_PRINT" (prints the loaded file) and the second parameter (cmdexecopt) set to OLECMDEXECOPT_DONTPROMPTUSER" (don�t show the print dialog).
    (For more information about these methods, please refer to the MSDN Library)
    I hope this helps.
    Regards
    Anand Jain
    National Instruments.

  • Print this page button

    Hi,
    I found this very handy liittle script for adding a print
    this page button to my pages. See below. I'd like to change the
    button though to a small image of a printer. Does anyone know how I
    can modify this script to achieve that.
    Thanks
    K
    <SCRIPT Language="Javascript">
    This script is written by Eric ([email protected])
    For full source code, installation instructions,
    100's more DHTML scripts, and Terms Of
    Use, visit dynamicdrive.com
    function printit(){
    if (window.print) {
    window.print() ;
    } else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0
    HEIGHT=0
    CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting
    dialog box WebBrowser1.outerHTML = "";
    </script>
    <SCRIPT Language="Javascript">
    var NS = (navigator.appName == "Netscape");
    var VERSION = parseInt(navigator.appVersion);
    if (VERSION > 3) {
    document.write('<form><input type=button
    value="Print this Page" name="Print"
    onClick="printit()"></form>');
    </script>

    Looks a bit archaic to me.
    Just do this -
    <form>
    <input type="image" name="printMe"
    src="images/whatever.jpg"
    onclick="self.print();">
    </form>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "KHam1234" <[email protected]> wrote in
    message
    news:gdpre8$mgq$[email protected]..
    > Hi,
    >
    > I found this very handy liittle script for adding a
    print this page button
    > to
    > my pages. See below. I'd like to change the button
    though to a small image
    > of a
    > printer. Does anyone know how I can modify this script
    to achieve that.
    >
    > Thanks
    >
    > K
    >
    > <SCRIPT Language="Javascript">
    >
    > /*
    > This script is written by Eric ([email protected])
    > For full source code, installation instructions,
    > 100's more DHTML scripts, and Terms Of
    > Use, visit dynamicdrive.com
    > */
    >
    > function printit(){
    > if (window.print) {
    > window.print() ;
    > } else {
    > var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0
    HEIGHT=0
    >
    CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    > document.body.insertAdjacentHTML('beforeEnd',
    WebBrowser);
    > WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a
    prompting dialog box
    > WebBrowser1.outerHTML = "";
    > }
    > }
    > </script>
    >
    > <SCRIPT Language="Javascript">
    > var NS = (navigator.appName == "Netscape");
    > var VERSION = parseInt(navigator.appVersion);
    > if (VERSION > 3) {
    > document.write('<form><input type=button
    value="Print this Page"
    > name="Print" onClick="printit()"></form>');
    > }
    > </script>
    >

  • ITS 6.1 :  Printing the contents in a  container in webgui

    Hai All,
    I have a  module pool program which displays, employees details with there photo in a container. I used method  "CALL METHOD html_control->execwb." to print the content within the container. The program works fine when i run the program in SAP gui. I have created the transaction code as "SAP GUI for HTML"
    The problem is we are using ITS server 6.1, when i run the same program in webgui, the print functionality is not working. The reason being the above method is related to OLE, which will not work in "SAP GUI FOR HTML".
    We can print the content of the container by right clicking whithin the container and selecting print. Is it possible to have that functionality by clicking a button in the screen. That is when the user clicks a button in the screen the content of the container should be printed.
    Please let me know, is there any solution for this.
    Thanks & Regards,
    H.K.Hayath Basha.

    Hi Hayath,
    this method is Windows only. Neither webgui nor java gui support the method because it based on OLE.
    But you can insert a link in the HTML and execute the print method of the window object when clicking on the link.
    Example:
    <html><head><title>Test</title>
    </head><body>
    <a href="javascript:window.print()">Print this page</a>
    </body></html>
    Regards,
    Klaus
    P.S.: I would recommend to upgrade to ITS 6.20. ITS 6.10 is no longer supported by SAP and SAP will refuse any OSS message regarding ITS 6.10.

  • Navigate to next document without saving any changes in last document in AxWebBrowser

    Hi,
    I am opening MS Office Document file in AxWebBrowser after that i navigate to next Office Document ,before navigating i saved the last document like this
    AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE, SHDocVw.OLECMDF.OLECMDF_ENABLED)
    but how can i navigate to next Document without saving it if it also have any changes?
    if i do not use above line of code it ask for "Save","Don't Save" and "Cancel" before navigating to next document.
    help me thankx

    Hi,
    I am opening MS Office Document file in AxWebBrowser after that i navigate to next Office Document ,before navigating i saved the last document like this
    AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE, SHDocVw.OLECMDF.OLECMDF_ENABLED)
    but how can i navigate to next Document without saving it if it also have any changes?
    if i do not use above line of code it ask for "Save","Don't Save" and "Cancel" before navigating to next document.
    help me thankx
    Hello,
    In this case, we need to get the object for that document inside the NavigateComplete2 event.
    And then we could call its
    close method before we navigate to the other document.
    For get the document object we could refer to the sample shared in
    How to use the WebBrowser control in Visual Basic to open an Office document
    Public Class Form1
    Dim OpenFileDialog1 As OpenFileDialog = New OpenFileDialog()
    Dim oDocument As Object
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
    Dim strFileName As String
    'Find the Office document.
    With OpenFileDialog1
    .FileName = ""
    .ShowDialog()
    strFileName = .FileName
    End With
    'If the user does not cancel, open the document.
    If strFileName.Length Then
    oDocument = Nothing
    AxWebBrowser1.Navigate(strFileName)
    End If
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Button1.Text = "Browse"
    With OpenFileDialog1
    .Filter = "Office Documents " & _
    "(*.docx, *.xlsx, *.ppt)|*.docx;*.xlsx;*.ppt"
    .FilterIndex = 1
    End With
    End Sub
    Private Sub Form1_Closing(ByVal sender As Object, ByVal e As _
    System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    oDocument = Nothing
    End Sub
    Private Sub AxWebBrowser1_NavigateComplete2(ByVal sender As Object, _
    ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) _
    Handles AxWebBrowser1.NavigateComplete2
    On Error Resume Next
    oDocument = e.pDisp.Document
    'Note: You can use the reference to the document object to
    ' automate the document server.
    MsgBox("File opened by: " & oDocument.Application.Name)
    End Sub
    End Class
    And for closing part, we could refer to
    How to: Programmatically Close Documents.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Hbj:link

    HI All,
    Im trying to put an image in an iView. Now when I click on this image a Java Script function should get called to print the content of the iView.
    Im using the following code but it doesnt seemd to work.
    Please tell me what am I missing
    <%
        String  PrintURL=componentRequest.getPublicResourcePath()
                +   "/../images/";
        %>
    <hbj:link
        id="print"
        text=""
        reference=""
        target="_TOP"
        tooltip="Print this iView which contains my CV"
        onClick="printCurrentPage"
        <hbj:image
        src="<%= PrintURL+"sap.gif" %>"
        alt="Image not available"  />
    </hbj:link>
    When I run this on the portal it gives the following error.
    Expecting '=' instead of '<'. Error in file:/usr/sap/D75/JC46/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/com.ericsson.pct.hcm.cpcv/pagelet/cpcvphoto2.jsp at line:48 position:4.
    Line 48 is :   onClick="printCurrentPage"
    but I think the error sems to be in : <b>src="<%= PrintURL+"sap.gif" %>"</b> since the last delimiter is not turning red.
    Plz help.
    Regards
    Saurabh

    Hi Venkatesh,
    I First Checked
    <%= imageURL %>
    This is throwing an error itself.
    its not going beyond that !!
    This is a my Javascript code :
              <script language="JavaScript">
              function printCurrentPage() {
                    if (navigator.appName.indexOf("Microsoft") > -1 &&
                        navigator.appVersion.indexOf("5.") == -1) {
                        // IE4
                           OLECMDID_PRINT = 6;
                           OLECMDEXECOPT_DONTPROMPTUSER = 2;
                           OLECMDEXECOPT_PROMPTUSER = 1;
                           WebBrowser =
                           '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="' +
                           'CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
                           document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
                           WebBrowser1.ExecWB(OLECMDID_PRINT,   OLECMDEXECOPT_PROMPTUSER);
                           WebBrowser1.outerHTML = "";
                   else {
                        //N4 IE5
                        //window.print();
                          self.print();
              displayPrintButton();
         </script>
    Regards
    Saurabh

Maybe you are looking for