Print Report using ASCII command through printer selection available on windows

Hi,
I'm using Labview 2009 to create a report using Report Generation Toolkit.
Creating a report is not the problem, the problem is I need to print the report manually by sending an ASCII Code.
I noticed that there are few example on send ASCII code command, but neither of them are related to printing.
The printer I use is Panasonic dot matrix printer KX-P1121E with USB port. (Fanfold type of paper)
I used "NI_report_lvclass: Print report.vi" from Report Generation before this to print my report, everything is okay and not receiving any error.
But I noticed that after finish printing, the paper will automatically feed out as if that VI (Print report.vi) is sending out "Form Feed" (FF) Command to the printer. 
My application cannot use this method because I need to print a set of data in every minute. If the data only have 2 rows, then it will be a wasting a lot of paper if everytime finished printing paper feeding out. I want the printer to continue standby on the same paper after finished printing previous data. In other words, maybe just manually send "Line Feed or Carriage Return" to the printer.
So I have a few things need to be clarified step by step;
1. How can I send an ASCII Code to my printer? Do you have any example for this? link below is the character of ASCII Codes that can be use :http://webpages.charter.net/dperr/links/esc_p83.ht​m
2. Can I send a report created by report generation to be printed using this ASCII command method?
3. If my printer is setup by using windows (Meaning: Available on "Printer and Faxes" list), How can I configure the printer setup in sending the ASCII Code? 
Really appreciated your reply
Thanks!

Hi Zwired1,
Just to make sure I fully understand the situation - I am assuming since you say you are printing to two different printers that when you are using the Print Report.vi you are using the printer name string to specify which printer you would like to print on. And if the printer that you specify is not functioning it automatically prints on the other printer, is that correct?
From looking at the code in the Print Report.vi, it looks like if you specify a printer name in the input string, if there is a problem with that printer or if that printer is unavailable, the VI should not print anything, so please let me know if that is not the behavior you are seeing.
For your question about checking the health of printers, there is a VI in the report gen toolkit called Query Available Printers. You can find it if you open up the Print Report.vi and choose the Standard Report instance, the Query Available Printers.vi is on the block diagram of that VI. It will return the list of available printers and the default printer.
I hope that helps,

Similar Messages

  • "no row count was produced" error using mqsl commands through Access

    "no row count was produced" error using mqsl commands through Microsoft Access. This sql statement works when I use in in the Access program but it does not work when I try and put it through Access using my Java program. Here is the block of code that I have that does the search.
    public static Game searchRecord(String search) throws SQLException{
    String query = "SELECT* " + "FROM gamefields WHERE SKU = '" + search + "' ORDER BY SKU ASC";
    Game lastGame = new Game(gamefields.getString(1),
    gamefields.getString(2),
    gamefields.getString(3),
    gamefields.getString(4),
    gamefields.getString(5),
    gamefields.getString(6),
    gamefields.getString(7),
    gamefields.getDouble(8));
    Statement statement = connection.createStatement(); //Creates connection
    //statment to database
    statement.executeUpdate(query); //Executes the delete query and Updates the database
    statement.close();
    close();
    open();
    return lastGame;

    When you use the code from java, you access access (!) through the ODBC interface. Things can be different in ODBC and Jet. When you use PrepareadStatements, you should be on the save side:
    public static Game searchRecord(String search) throws SQLException
    String query = "SELECT * FROM gamefields WHERE SKU = ? ORDER BY SKU ASC";
    PreparedStatement statement = connection.prepareStatement(query);
    statement.setString(1,  search);
    ResultSet rs = statement.executeQuery(query);
    if(rs.next()
    // if a row retuned extract the details here
    rs.close();
    statement.close();
    return lastGame;
    }

  • Sending ASCII commands through USB hub

    I am having issues connecting to hardware. I have 3 types of hardware connected to a Serial to USB converter hub. 2 of the hardware take ASCII commands while the other does not. I am able to communicate with the hardware individually without the hub but when I connect the hardware to the hub and the hub to my computer, it does not work. I do not think MAX sees the hardware connected. Any ideas?
    CLD Certified 2014

    When you say "hub", are you talking about a product like the QUATECH USB to serial adapter (4 ports)?
    If so, then each port has its own serial port assigned to it.  You should be able to communicate through it using a terminal emulator, such as HyperTerm, TerraTerm, ProCOMM, etc.  
    You do have to install the driver for the box and you can also configure the starting COM port number.  For instance, Port A on my box is COM-3.
    You can open multiple ports in parallel, as long as you select different COM port numbers.
    MAX should see the serial ports.

  • Using SCP command through Startand Java Library

    Hello,
    Is there any class or way available in Standard Java Library to use SCP command. Actually I want to copy file from one Linux system to another through Java code using SCP protocol .
    Zeeshan Hanif

    If we can't dissuade you from this course, I'll help you get started: go find RFC 4251, read it, understand it, love it. Then you'll have to do the same with 4252, 4253, 4254, 4255, and 4256. Also, don't forget 1321, 1950, 2104, 2144, 2409, 2440, 3447, and 3526. Then just brush up on java sockets, crypto and IO. Easy as pie! (assuming that pie has 15,641 ingredients, 63 layers, a nine-volume recipe, and must be baked in a perfect vacuum)
    :-)

  • Error while exporting webi reports using BIAR command line tool.

    HI,
             We are trying to export webi objects to a biar file using the biar command line tool, biarengine.jar in XI 3.0. We are using the query select * from ci_infoobjects where si_kind='webi'.
    We are getting an error "unable to create plugin object".
    Export of all other objects is going through fine.
    Any ideas?
    Thanks,
    Ashok

    Try this
    importBiarLocation=C:/test.biar
    action=importXML
    userName=UserName
    password=Password
    CMS=cmsname:6400
    authentication=secEnterprise
    exportQuery=select * from ci_appobjects where si_kind='universe'

  • Send Ascii command Through RS232 Interface in labview

    Hello,
    I tried to use labview to control the CD2A Compudrive.
    Actually I found the driver of CD2A online in the following link
    http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=266
    but however, I still can't use this driver to send the command and adjust the parameter.
    p.s. Use only "CD2A Setup" or "CD2A Init" should be enough to set the parameter and command, right?
    The command code written in the CD2A Manual is, for example,
    <STX>ST600<ETX><LF>   which is Start of Message,Start Position 600 nm, End of Message, Line Feed
    I've tried to send this using MAX (Measurement & Automation Explorer), but the signal I got back is
    −1073807298
    = Could not perform operation because of I/O error.
    For the command in the driver above,
    The code is written in number form of ascii format  >> e.g. <STX> = ascii 02
    and The Code is written as
    \02ST600\03\r
    But sending this code>> nothing happens
    Which is quite confusing for me.
    1. Is it general to write \02  to send <STX> signal??
    2. actually <LF> = ascii 10  >> so why does it use    /r         instead?
    3. What should I do, is my format correct???  I can't even send one signal to operate it at all.
    Thank you very much for help

    A string control can set for 4 different types of display. When you right click on it, you can select Normal, '\' Codes, Hex, or Password. Normal is ASCII character and the unprintable characters such as <STX> cannot be entered. The <STX> is hex 02 so you enter this as \02. The '\' says to interpret the next byte as hex. A <LF> is not ASCII 10 at all. It is hex 0A. For readability, it was decided a long time ago that certain '\' characters could be represented a bit differently. If \n, that was hex 0A. A \r is hex 0D or the CR. You can find documentation on these stand C Escape Sequences. In LabVIEW, you can type \0A into your control and it will automatically convert or \n.
    Your other option is to use hex display. You just enter all of the hex equivalents though it makes entering the ST600 a bit more difficult in your case.
    I'm not sure if the data entry in MAX is set for '\' Code Display and whether it is interpretting your string correctly. I know that the Basic Serial Write and Read example in LabVIEW is set this way and you might want to try that.

  • I am attempting to upload multiple photos on a macpro from a cd.  I am used to a pc.  I tried using the command button to select multiples but it does not work.  Please advise

    I am attempting to upload multiple photos on a mac pro from a cd.  I have tried holding the "command"button down to select multiple photos but it does not work.  Please advise.  Thanks,John

    why not sort by (name, date, etc) and Click on 1st and Shift-Click on last.
    Might work better to copy or import to a project folder.
    https://discussions.apple.com/community/ilife/iphoto
    http://www.apple.com/support/iphoto

  • Printing Options - additional option - "Print Selected"

    I would like to see an option in the print window for "Print Selected" as in Windows.
    The only choice we have, AFAIK, is to print a single page or the whole enchilada.
    If I wish to print a small selection from a large page I have to copy and paste it into a text file and then print that.
    It would be handy to simply be able to select an area with the mouse to be printed and print it directly from the print function.
    Dual G5 and MacBookPro   Mac OS X (10.4.8)  

    http://discussions.apple.com/thread.jspa?threadID=929845&tstart=0

  • How to create report using Procedure.

    Hi All,
    I want to create report in apex.But i do not have sql code.I have one procedure.Is it possible to create report using this procedure in apex.
    CREATE OR REPLACE PROCEDURE headcsv_prc2
    AS
       CURSOR cr_header
       IS
          SELECT ood.organization_code, fm.formula_no AS "FORMULA_NAME",
                   fm.formula_vers AS "FORMULA_VERSION",
                   fm.formula_desc1 AS "FORMULA_DESC",
                   DECODE (fm.formula_status,
                           100, 'New',
                           400, 'Approve for Laboratory Use',
                           700, 'Approve for General',
                           800, 'On Hold',
                           900, 'Frozen',
                           1000, 'Obsolete/Archived'
                          ) AS "FORMULA_STATUS",
                   DECODE (fd.line_type, '1', msib.segment1) product,
                   DECODE (fd.line_type, '-1', msib.segment1) ingrediant,
                   DECODE (fd.line_type, '2', msib.segment1) AS "BY_PRODUCT",
                   DECODE (by_product_type,
                           'W', 'Waste',
                           'R', 'Rework',
                           'Y', 'Yield',
                           'S', 'Sample',
                           NULL
                          ) AS "BY_PRODUCT_TYPE"
              FROM org_organization_definitions ood,
                   fm_form_mst fm,
                   fm_matl_dtl fd,
                   mtl_system_items_b msib
             WHERE ood.organization_id = fm.owner_organization_id
               AND fm.owner_organization_id = msib.organization_id
               AND msib.organization_id = fd.organization_id
               AND fd.organization_id = ood.organization_id
               AND fm.formula_id = fd.formula_id
               AND msib.inventory_item_id = fd.inventory_item_id
               -- and fm.FORMULA_NO like'%TEA%'
               AND fd.line_type IN ('1', '2', '-1')
          GROUP BY ood.organization_code,
                   fm.formula_no,
                   fm.formula_vers,
                   fm.formula_desc1,
                   fm.formula_status,
                   fd.line_type,
                   msib.segment1,
                   by_product_type
          ORDER BY fm.formula_no, fm.formula_vers;
    BEGIN
       DBMS_OUTPUT.put_line (   INITCAP ('ORGANIZATION CODE')
                             || ','
                             || INITCAP ('FORMULA NAME')
                             || ','
                             || INITCAP ('FORMULA VERSION')
                             || ','
                             || INITCAP ('FORMULA DESC')
                             || ','
                             || INITCAP ('FORMULA STATUS')
                             || ','
                             || INITCAP ('PRODUCT')
                             || ','
                             || INITCAP ('INGREDIANT')
                             || ','
                             || INITCAP ('BY PRODUCT')
                             || ','
                             || INITCAP ('BY PRODUCT TYPE')
       FOR ch IN cr_header
       LOOP
          DBMS_OUTPUT.put_line (   ch.organization_code
                                || ','
                                || ch.formula_name
                                || ','
                                || ch.formula_version
                                || ','
                                || '"'
                                || ch.formula_desc
                                || '"'
                                || ','
                                || ch.formula_status
                                || ','
                                || ch.product
                                || ','
                                || ch.ingrediant
                                || ','
                                || ch.by_product
                                || ','
                                || ch.by_product_type
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error No: ' || SQLCODE || 'Error Msg: '
                                || SQLERRM
    END;
    EXEC HeadCSV_Prc2
    Thanks,
    Raghu

    RaghuVarma wrote:
    I created one report using sql code.(Ex: select * from emp).
    But my higher authorities want that for security purpose They will change the code into java.
    What "higher authorities"? What "security purpose"?
    In this process they changed my code as a procedure.Finally they give that java code.they tell to me please fix in apex.
    Do these "higher authorities" know anything about APEX? What does the Java code actually do? Have you asked them how their approach is to be integrated into APEX?
    There is no reason why a properly written Java stored program cannot be used in APEX, provided that whatever it is doing makes sense in an APEX/web context, and isn't some nonsense like using DBMS_OUTPUT to generate a CSV.
    I tried so many ways.But it is not fixed.Different Different errors will occurs.
    Tried what? Demonstrate what you have tried, preferably using examples on apex.oracle.com.
    How to solve this.
    How to solve what? No clearly defined problem or requirement has been identified.
    Describe the the problem/requirement (not your attempted solutions) in detail.
    How to ask questions
    Re: 2. How do I ask a question on the forums?
    Include as much relevant information with your question as possible, starting with:
    APEX version
    DB version, edition and host OS
    Web server architecture (EPG, OHS or APEX listener), platform, and host OS
    Browser(s)/version(s) used
    Theme
    Templates
    Region type(s)

  • Customer ageing report using FDI4, FDK1

    Hello,
    I have developed customer ageing in report painter. Created a form using FDI4 & report using FDI1.
    In the selection screen i have
    company code
    Open item at key date
    Currency:
    I need some 2 more fields like GL account ( Customer recon account) and Currency. GL Account field is not available in characteristic. I need this field. How can i get this filed?
    And my company code currency is SAR(Saudi Riyal). If i execute with currency USD. The report is not executing. could some one explain me.
    Regards,
    SK

    Some further testing and we managed to know why the credit notes were not appearing.
    Our current database is set up with the following basic initialisation settings un tick. By changing enabling this option, the credit memo do appear.
    Use Negative Amount for reverse transaction
    Thanks
    Kentish
    Edited by: Rui Pereira on May 1, 2009 1:57 PM

  • Displaying an ALV report using a saved layout.

    Dear friends
    In ALV report there are 2 standard buttons.
    One says "select Layout CTRLF9" and another one says "Save Layout CTRLF10".
    Using this I can select the layout and save it using some variable.
    Now I want to create a field in the main screen so that when
    I enter this saved name  and run  the ALV report, it should show
    report using the layout I entered selected (which was saved earlier).
    Where will this variable get saved and how can i access this and make it
    display using this layout.
    Any feed back will be greatly appreciated.
    Thanks
    Ram

    Hi Ram,
    Try this code..
    BR
    Rakesh
    **// INITIALIZATION.
    initialization.
      perform initialize_variables.
    **// AT SELECTION-SCREEN.
    at selection-screen.
      if p_vari is initial.
        variant_init.
      endif.
      perform check_email.
    at selection-screen on value-request for p_vari.
      alv_f4_for_variant.                                       "#EC
    at selection-screen on p_vari.
      alv_pai_of_selection_screen.
                                  M A C R O S                            *
    define variant_init.
      clear: disvariant,
             vartext.
      if v_pgm is initial.
        disvariant-report     = sy-cprog.
      else.
        disvariant-report     = v_pgm.
      endif.
    end-of-definition.
    define alv_f4_for_variant.
      variant_init.
      call function 'REUSE_ALV_VARIANT_F4'
           exporting
                is_variant = disvariant
                i_save     = xsave
           importing
                e_exit     = i_exit
                es_variant = disvariant
           exceptions
                not_found  = 2.
      if sy-subrc = 2.
        message id sy-msgid type 'S'      number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      elseif i_exit = space.
        p_vari  = disvariant-variant.
        vartext = disvariant-text.
        refresh i_dynpread.
        i_dynpread-fieldname  = 'VARTEXT'.
        i_dynpread-fieldvalue = disvariant-text.
        append i_dynpread.
        call function 'DYNP_VALUES_UPDATE'
             exporting
                  dyname     = v_pgm
                  dynumb     = '1000'
             tables
                  dynpfields = i_dynpread.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                  with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
      else.
        variant_init.
      endif.
    end-of-definition.
    define alv_pai_of_selection_screen.
      if not p_vari is initial.
        move p_vari to disvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
             exporting
                  i_save     = xsave
             changing
                  cs_variant = disvariant.
        vartext = disvariant-text.
      else.
        variant_init.
      endif.
    end-of-definition.

  • How to print pdf file in SQL Server Reporting services report using command prompt?

    Is there a way to automatically print a SQL Server Reporting services report on command prompt? For eg: We can save a pdf file using rs.exe utility. I want to print a pdf using rs.exe utility. Is it possible? I don't want to install any 3rd party software.

    Thanks Simon for replying to my question.
    In oracle form, there is oracle command to print the report from command prompt with the help of rwrun.exe
    e.g: rwrun.exe   REPORT="D:\Test\REP_25\MLA.REP" DESNAME="testprinter" DESTYPE="PRINTER" P_FORMNAME="MLA.FMX" P_SPRACHE="E" P_SPRACHE_NR2="1" P_WHERE_BEDINGUNG="order by land_nr" USERID="test/test.world" PSV_NAME="PSV_DEMO" PSV_JOB_ID="PS$9583" RECURSIVE_LOAD="NO"
    BATCH="YES" NONBLOCKSQL="NO" ARRAYSIZE="1" PARAMFORM="NO" ERRFILE="c:\temp\psv16.tmp"<
    and to save the report we just need to change DESNAME="c:\temp\OC_100001349.pdf" DESTYPE="FILE" in above command instead of DESNAME="testprinter" DESTYPE="PRINTER".
    DESNAME and DESTYPE are the input parameters of the respective report.
    In SSRS, we can run the file from the command prompt and save it.
    rs -i "C:\Users\pujarswa\Documents\reports\new\LoadReport.rss" -s ww2004760:80/ReportServer_MSSQL -v fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"
    -v reportPath="/TipsReport/LoadListTabular" -t -v format="PDF" -v LandNr=4 -u ap\swati -p test@# -e Exec2005
    But we cannot use same command for printing as you said we need to create another script for printing files.
    I have gone through the links but I dont want to use Adobe Acrobat Reader exe for printing because client it may not have Adobe Acrobat Reader on their machine.
    Also I want to pass a input parameter as type="Printer" to my report which will print directly for me and same I can acheive in command prompt passing type="Printer" fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"

  • Using enscript command to print O*F(10.7) reports thru the application on SUN

    If anyone one has used enscript command in O*F(10.7) thru Define Print Drivers with parameters like enscript --margins=42:26:14:14 -r -B -fCourier6 -q
    -d$PROFILES$.PRINTER -t"$PROFILES$.TITLE"
    -n$PROFILES$.CONC_COPIES $PROFILES$.FILENAME on Sun Solaris. We are having problems printing Title on header page even though we are passing the parameters "TITLE" for postscript printing. Any suggestions would be highly appreciated.

    This could be related to the "caret browsing" feature, which moves the cursor through the page when you scroll with the arrow key. Or maybe in this case skips around things in the page.
    You can turn that using either:
    * F7 key
    * "3-bar" menu button (or Tools menu) > Options > Advanced > General mini-tab > ''uncheck'' the box for "Always use the cursor keys to navigate within pages"
    Any luck?

  • New customized report using PLD or QUERY PRINT LAYOUT to show customers onl

    I am working with a Software Developing firm as an SAP Consultant.
    Please tell me how to create a new     customized     report displaying various details as required by the client in the report using PLD or Query Print Layout.
    Please help me asap.

    Hi,
    You can create queries using the Query Generator or the Query Wizard tools.
    After you have created your own queries, you can link them to a required print layout.
    for user reports.Look at:
    Tools --> Queries --> Query Print Layout
    Set there your query reports.
    Printing User-Defined Queries
    After you had linked a user-defined query to a user report template, you can now print it
    according to its linked print layout.
    There are two ways for printing your user-defined queries.
    1. Using the Query Print Layout window:
    • Select from the upper menu Tools &#1048774; Queries &#1048774; Query Print Layout.
    • Click the Reports tab page.
    • Click to highlight the required query you would like to print.
    • Click on the printer icon or select from the upper menu File &#1048774; Print.
    • The user-defined query is printed according to its linked print layout.
    2. Using the Queries Manager window:
    • Click the Queries Manager icon on the upper tool bar.
    • Click to highlight the required query you would like to print.
    • Click on the printer icon or select from the upper menu File &#1048774; Print.
    • The user-defined query is printed according to its linked print layout.
    Note! You can also print preview user-defined queries. Do so by selecting the Print
    Preview option as described in the methods above for printing your query.
    Btw, you could search the manual training files relate to query PLD in http://www.service.sap.com/smb
    Rgds,

  • Print Selection Criteria-Token in report prepared with CR

    Hi,
    How to print the Selection Criteria---Specially 'From Date' and 'To Date' for a report prepared with Crystal Report tool to be viewed within SAP Business One 8.8 (The report uses Token Parameters for SBO 8.8 Viewing)
    Thanks,
    Saikat

    Hi Bala,
    Ok...So can help me on this.......
    The token in my Report is :
    Date : Static-Type: Date-Allows Range Values
    Within SBO 8.8 displays as Date : From <Date Selection Field> To <Date Selection Field>
    Please note its a single token allowing range values.
    Formula I am using: {OPOR.DocDate}>={?Date} AND {OPOR.DocDate} <={?Date}
    Now I need to print the selected 'From Date' and 'To Date' in the Report.
    If there is any other process to do the same then please let me know the same.
    Thanks,
    Saikat

Maybe you are looking for