Use Srw.set_printer_tray

Hi All
i use build-in packgage srw.set_printer_tray for setting tray printer
but didn't work . it show error message that didn't know tray name
note : i use HP laser printer tc5100n that 3 tray optional (duplex)
i show my source code.
function BetweenPages return boolean is
begin
SRW.SET_PRINTER_TRAY('TRAY 1'); <---didn't work
return (TRUE);
end;
i have no idea to assign tray name please help me.
Thanks

Hi,
It looks, the tray name is wrong in SRW.SET_PRINTER_TRAY. Please try with "Tray 1" or " Tray 1".
Thanks,
Puvan

Similar Messages

  • How do I check that a printer tray exists before using srw.set_printer_tray

    Due to printer firmware issues I cannot know in advance whether the printer's tray number has a space in front of it.
    Ex: '2' vs. ' 2'
    I have introduced this code to production, but if the tray value passed in does not exist, then an error is thrown when setting the printer tray.
    If I cannot determine this in advance, then I would like the code not to fail and simply skip the assignment. The printer tray selection is only a convenience to the end user. This is important becasue I have hundreds of printers to which a report may be printed.
    function BetweenPage return boolean is
    begin
    IF :PLABLE_TRAY IS NOT NULL AND :PLABLE_TRAY <> '' THEN
         srw.set_printer_tray(:PLABLE_TRAY);
    return (TRUE);
    END IF;
    return (TRUE);
    end;
    Thx in advance,
    Gary

    high-Q wrote:
    It's an autonomous test station with various measurement instruments. I'm closing the bus after reciving the string from each instrument.
    Again, that makes no sense.  Part of the command over the bus is the address.  So if you know all of your instruments' addresses, you just supply that when you iteract with that instrument.  There is no reason to constantly open and close your bus.
    The problem with checking to see if data is available is that you have to send a querry to the instrument.  You are the master of the bus.  Nobody else can send data without you letting them.  So you have to keep you bus open and send querries to check to see if the oscilloscope is ready to send data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Srw.set_printer_tray and PDF

    I am trying to set the printer tray for a report in 9ids 9.0.2 with the output being pdf. Does srw.set_printer_tray work when the output is PDF or does in only work with postscript files output.

    Hi,
    It will work only when you use DESTYPE=printer. When you output to say PDF, it cannot store the information about the printer tray in the PDF document. Also see Builder Help on "SRW.SET_PRINTER_TRAY" for usage notes, and restrictions.
    Navneet.

  • SRW.SET_PRINTER_TRAY    ----- Urgent

    Hello
    This procedure specifies the name of a valid printer tray and can be used to switch to different printer tray.
    I have done in the Beforereport-Trigger:
    Function BeforeReport return boolean is
    Begin
    srw.set_printer_tray('Upper Paper Tray');
    return (True);
    End;
    Now my question:
    SRW.SET_PRINTER_TRAY('myTRAY')
    myTRAY is the name of a vilid printer tray and can be used to switch to different printer. Now where can I read the information for myTRAY and how have I it to call?
    In the system-settings (printer) of Windwos XP the properties from the printer tray shows me: Fach 1, Fach 2, Fach 3, automatisch. Where is the necessary information which I have to write in place 'myTray' and how must it be?
    Many thanks for your help!
    René

    Rejesh
    I dn't have any printer without space in name.Is that space issue?It is printing good if i run it in paper layout but it is not working in browser.
    Thanks

  • SRW.SET_PRINTER_TRAY in Report 10g...Urgent help please

    I am facing problem in getting printout from desired tray in reports 10g.I have below beforereport trigger written:
    function BeforeReport return boolean is
    begin
    SRW.SET_PRINTER_TRAY(' Tray 3');
    return (TRUE);
    end;The same is working good in report 6i.I run printerdrivertest and it has only one error :
    **** DT112: DRIVER ERROR: Color has changed
    I don't think this is related to any tray selection.
    Please help me.I need to do it very soon.Lookong for expert's help..

    Rejesh
    I dn't have any printer without space in name.Is that space issue?It is printing good if i run it in paper layout but it is not working in browser.
    Thanks

  • Srw.set_printer_tray.................PROBLEMS

    HI,
    I am trying to get a report to print to tray 3. It will only print out of tray 2 right now. I have the following code inside a BEFORE REPORT TRIGGER:
    function BeforeReport return boolean is
    begin
    SRW.SET_PRINTER_TRAY('Tray 3');
    return (TRUE);
    end;
    I've tried putting in 'Tray 1' but it still prints out of Tray 2. Is there anyway to remedy this?

    I have a report that is switching between trays, but the srw.set_printer_tray is on the format trigger of a field called rtype.
    Rtype format trigger:
    IF glob.rtype = 'D' THEN
    srw.set_printer_tray('Lower Paper Tray');
    ELSE IF glob.rtype = 'S' THEN
    srw.set_printer_tray('Tray 2');
    ELSE IF glob.rtype IS NULL THEN
    srw.set_printer_tray('Tray 2');
    END IF;
    END IF;
    END If;
    Glob is a program unit like this:
    PACKAGE glob IS
    rtype varchar2(1);
    END;
    The database value of the field that is formatted determines when the report should switch trays.
    I hope this is a help.

  • Hide URL using srw.run_report

    I called a report from a form 10g using RUN_REPORT_OBJECT which hides url.
    Now i called a report with in report using srw.run_report which shows hole url in the browser.
    I want to hide url.

    Can I use this build it to run itself? I mean in your case run report A?
    our report is launched from servelet. because of some security issues, I would like to use this built in to change it to command line after user enter all the parameters through the parameter form.
    thanks.

  • Is there a restriction on using SRW.RUN_REPORT per session

    I am running a driver report which in turn calls the detail report using SRW.RUN_REPORT package. The driver report eventually fails with a core dump after calling the detail report for 999 times. It doesn't matter how big the report is as I've tried it with a very simple report which outputs sysdate in a file.
    Any ideas? Where to look for and what to change so that it can run the report using SRW.RUN_REPORT package more than 999 times.
    Thanks.
    Please reply to: [email protected]

    I found the answer, Xcelsius 2008 SP3 is not supported on Windows Server 2008.
    Before trying to use more products please check the supported platforms for all products. For example you can see in Xcelsius documentation that SAP Business Objects Xcelsius 2008 SP3 is not supported on Windows Server 2008. This means that, even if BPC 7.5M supports Windows Server 2008, it is not possible to use both BPC 7.5M and Xcelsius 2008 SP3 on a Windows Server 2008.

  • Using SRW package to send a report via email

    Hi,
    Please can someone please help me resolve this issue I have been facing in using the srw package
    I have configured a report server and was trying to use the srw package to send a report out to our customers when there is an update on a particular table.
    I have succesfully use this same procedure to generate the same report to an output file and it was ok but anytime I try to generate the report as a mail and send to a DESNAME, i get mail server unavailable.
    Below is the procedure i try to execute:
    procedure testrep(new_name in varchar2) as
    myPlist SRW_PARAMLIST;
    myIdent SRW.Job_Ident;
    BEGIN
         myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
    srw.add_parameter(myPlist,'GATEWAY','http://technorth4:7780/reports/rwservlet');
    srw.add_parameter(myPlist,'SERVER','rep_technorth4');
    srw.add_parameter(myPlist,'REPORT','c:\gens\name.rdf');
    srw.add_parameter(myPlist,'USERID','gens/[email protected]');
    srw.add_parameter(myPlist,'AUTHID','orcladmin/password1@orcl');
    srw.add_parameter(myPlist,'DESTYPE','MAIL');
    srw.add_parameter(myPlist,'DESFORMAT','PDF');
    srw.add_parameter(myPlist,'FROM','[email protected]');
    srw.add_parameter(myPlist,'DESNAME','[email protected]');
    srw.add_parameter(myPlist,'T1',new_name);
    myIdent := srw.run_report(myPlist);
    END;
    when i now start debugging i got this error:
    SQL> set serveroutput on
    SQL> exec srw.start_debugging
    * WELCOME TO EVENT-BASED-REPORTING API *
    * API-Version : 9i *
    * (C) Oracle Corporation, 2000 - 2002 *
    * Debugging turned ON **************************
    PL/SQL procedure successfully completed.
    SQL> exec testrep('TOPE');
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://technorth4:7780/reports/rwservlet
    *** Length of Paramlist : 2
    OK : Parameter added : SERVER=rep_technorth4
    *** Length of Paramlist : 3
    OK : Parameter added : REPORT=c:\gens\name.rdf
    *** Length of Paramlist : 4
    OK : Parameter added : USERID=gens/[email protected]
    *** Length of Paramlist : 5
    OK : Parameter added : AUTHID=orcladmin/password1@orcl
    *** Length of Paramlist : 6
    OK : Parameter added : DESTYPE=MAIL
    *** Length of Paramlist : 7
    OK : Parameter added : DESFORMAT=PDF
    *** Length of Paramlist : 8
    OK : Parameter added : [email protected]
    *** Length of Paramlist : 9
    OK : Parameter added : [email protected]
    *** Length of Paramlist : 10
    OK : Parameter added : T1=TOPE
    Starting run_report: building url
    *** Building URL (RUN_REPORT)
    OK : URL built :
    http://technorth4:7780/reports/rwservlet?SERVER=rep%5Ftechnorth4&REPORT=c%3A%5Cg
    ens%5Cname%2Erdf&USERID=gens%2Fgens%40technorth%2Eworld&AUTHID=orcladmin%2Fpassw
    ord1%40orcl&DESTYPE=MAIL&DESFORMAT=PDF&FROM=tope%5Folowosale%40gtbplc%2Ecom&D
    *** Submitting HTTP Request
    *** using URL
    :http://technorth4:7780/reports/rwservlet?SERVER=rep%5Ftechnorth4&REPORT=c%3A%5C
    gens%5Cname%2Erdf&USERID=gens%2Fgens%40technorth%2Eworld&AUTHID=orcladmin%2Fpass
    word1%40orcl&DESTYPE=MAIL&DESFORMAT=PDF&FROM=tope%5Folowosale%40gtbplc%2Ecom&DES
    OK : Request submitted - Return stream : <?xml version = '1.0' encoding =
    'ISO-8859-1' standalone = 'yes'?>
    <serverQueues>
    <error code="50138"
    component="REP" message="Mail server is not available"/>
    </serverQueues>
    OK : Request submitted - Length of stream : 182
    *** XML-Parsed - Following Structure discovered :
    *** Checking elements!
    serverQueues ()
    *** Checking attributes!
    error
    *** Checking attributes!
    __code = 50138
    __component = REP
    __message = Mail server is not available
    *** Finished Parsing XML
    Getting value for element: job
    Getting value for element: error
    *** Requesting value for Attribute error.component [REP]
    Getting value for element: error
    *** Requesting value for Attribute error.code [50138]
    Getting value for element: error
    *** Requesting value for Attribute error.message [Mail server is not available]
    REP-50138:Mail server is not available
    BEGIN testrep('TOPE'); END;
    ERROR at line 1:
    ORA-20999:
    ORA-06512: at "GENS.SRW", line 284
    ORA-06512: at "GENS.SRW", line 815
    ORA-06512: at "GENS.TESTREP", line 17
    ORA-06512: at line 1
    Please can someone help me with this. I can connect to the mail server using the telnet mailservername port,i get a 220 message with ***** .
    I have updated d report configuration file with the mailserver name, and d proxyinfo.xml too.I put it to bypass proxy for d mail server address and also inlclude the proxy ip and port.
    Kindly assist me as it is urgent.
    Thank you.

    You are in the wrong forum. Please try the Reports.<br><br>
    Regards,
    Rob.

  • Using srw.run_report in report server

    Dear all,
    I'm running a report (report A) on the report server and after it is running (printing output on screen), I need to run report B at the background and save the output of report B to the file system. In the report A's After Report Trigger, I have a srw.run_report function, the syntax is: srw.run_report('server='||v_serverName||' report='||v_reportName||' batch=yes destype=file desname=/tmp/output.pdf desformat=pdf p_startdate=''12-JUN-2003'' p_enddate=''14-JUN-2003'''). When I run the above syntax (without the server name part) in report builder, it works fine. But I couldn't get it working on the report server. Each time report A runs, report B couldn't be run at all (no job id was given or scheduled). Could anyone give me an idea on whether srw.run_report could be used in the report server?
    Many thanks for your urgent help.
    Rose

    Can I use this build it to run itself? I mean in your case run report A?
    our report is launched from servelet. because of some security issues, I would like to use this built in to change it to command line after user enter all the parameters through the parameter form.
    thanks.

  • Using SRW api : strange error message

    Hi all,
    i am using the srw api to generate reports out of the database. here is the procedure i have written:
    CREATE OR REPLACE PROCEDURE Create_Reports
    AS
    v_paralist PORTAL.SRW_PARAMLIST;
    v_ident     PORTAL.SRW.JOB_IDENT;
    BEGIN
    v_paralist := PORTAL.SRW_PARAMLIST(PORTAL.SRW_PARAMETER('',''));
    PORTAL.srw.add_parameter(v_paralist, 'GATEWAY', 'http://my.ias_machine.com/reports/rwservlet');
    PORTAL.srw.add_parameter(v_paralist, 'SERVER', 'repserver);
    PORTAL.srw.add_parameter(v_paralist, 'DESFORMAT', 'PDF');
    PORTAL.srw.add_parameter(v_paralist, 'DESTYPE', 'FILE');
    PORTAL.srw.add_parameter(v_paralist, 'DESNAME', 'w:\transfer\pdfs\eventdriven_test.pdf');
    PORTAL.srw.add_parameter(v_paralist, 'REPORT', 'testreport.rdf');
    PORTAL.srw.add_parameter(v_paralist, 'USERID', 'username/password@exampledb');
    v_ident := portal.srw.run_report(v_paralist);
    END;
    The following error has occurred during execution:
    ORA-01849: hour must be between 1 and 12
    ORA-06512: at "PORTAL.SRW", line 290
    ORA-06512: at "PORTAL.SRW", line 774
    ORA-06512: at "PRAMA.CREATE_REPORTS", line 16
    ORA-06512: at line 2
    Neither in the report nor in another table which i use for this , i have a column with date or time datatype, so why does this error message occur?
    Do you have any ideas?
    Katharina

    If I run this report locally in reports builder it works without problems. Is it possible that the setting system time of the computer has something to do with this error message? After testing and troubleshooting the last days I found out that the report runs without problems only in the morning until 12.00 AM (?). In the afternoon and evenings I get this error message...
    Has anybody similar experiences?
    thank you!!

  • Controling Date Parameters using SRW.DO_SQL in Reports!

    Hello Friends,
    I Need to Control the Date Parameters in Reports.
    (Dev/2000 rel2.1) In SRW.Do_SQL package
    For Example:
    'Insert into x
    select * from Y
    where Y.date between f_date and t_date';
    Here: X,Y are two tables
    f_date and t_date are two different date parameters in
    format (dd-mm-yyyy).
    NOTE: Without these two date parameters, the Query is working
    fine. But I need to Use these Parameters. Could You Please find a
    solution for Me. Thanks in advance.
    Regards
    Manoj (India)
    (Dt:18thNov'99)
    null

    Manoj (guest) wrote:
    : Hello Friends,
    : I Need to Control the Date Parameters in Reports.
    : (Dev/2000 rel2.1) In SRW.Do_SQL package
    : For Example:
    : 'Insert into x
    : select * from Y
    : where Y.date between f_date and t_date';
    : Here: X,Y are two tables
    : f_date and t_date are two different date parameters
    in
    : format (dd-mm-yyyy).
    : NOTE: Without these two date parameters, the Query is working
    : fine. But I need to Use these Parameters. Could You Please
    find a
    : solution for Me. Thanks in advance.
    : Regards
    : Manoj (India)
    : (Dt:18thNov'99)
    Hi Manoj
    your goal is to supply all three as dates (y.date, f_date,
    t_date). if some of them are not date but char, varchar, ...
    then use to_date conversion function with proper format mask.
    hope this helps.
    null

  • Not able to use SRW.USER_EXIT in oracle forms.

    Hi,
    Below is my requirement in oracle forms:
    I have a query form, which has Inventory Category Set field and Category 'From' and 'To' fields. Based on the values selected by the user for Category Set, possible combinations for Categories should be displayed in Cateogory 'From' and 'To' fields. Upon clicking the 'Find' button, only the items which belong to this category set and the range of Cateogies selected should be displayed.
    Note that 'Item Categories' Key flex field should be used here. Number of Segments for each Category set will differ. To acheive this, I have attached the Key flex field to the Cateogory 'From' and 'To' fields.
    In the PRE-QUERY trigger of the datablock, I have to use where condition to filter the items based on the category sets and categories. This where condition should be generated dynamically based on the search criteria.
    In oracle report, we have provision to use the below USER_EXIT to get the where condition to append to my PRE-QUERY statement.
    SRW.USER_EXIT('FND FLEXSQL CODE = "MCAT"
    OUTPUT = ":P_WHERE_CAT"
    APPL_SHORT_NAME= "INV"
    MODE = "WHERE"
    DISPLAY = "ALL"
    NUM = ":P_STRUCT_NUM"
    TABLEALIAS = "MCA"
    OPERATOR = "BETWEEN"
    OPERAND1 = ":P_CATEGORY_FROM"
    OPERAND2 = ":P_CATEGORY_TO"');
    But in forms, I am not able to use this USER_EXIT. Please let me know the alternate ways to get the where condition dynamically in forms.
    Thank you in advance.
    Regards,
    Kalyan

    RAISE APPLICATION_ERROR built-in is raised in a DB procedure/function or trigger.
    You can write an ON-error trigger that will trap any DB error messages
    or
    You can use Dbms_Error_Code & Dbms_Error_Text for trapping the Error.

  • Using SRW Package - Help

    Hello All,
    I've designed web based reports having a web layout. The user usually navigates from one report to another by way of ">
    <th <rw:id id="HFMONTH131" breakLevel="RGMONTH1313" asArray="yes"/> class="OraRowHeader" style="font-weight: normal" ><rw:field id="FMONTH131" src="MONTH" breakLevel="RGMONTH1313" breakValue=" " formatTrigger="STYLE1"> F_MONTH </rw:field></th></a>
    I'm aware of reports being opened,errors captured,messages displed & programs aborted using the various srw packages when called from inside a program unit.
    Is there a way to call a program unit when the user clicks on a particular field which is supposed to be a link to another report instead of the above mentioned hyperlink method. Like for instance we have a formatTrigger for calling a program unit written for manipulating the format of the output.
    Regards,
    Arun.V

    Hello,
    Web Layout only exists in Reports versions >= 9.0.2. In these versions, the object "Button" no more exists.
    When the output is displayed, the reports execution is terminated, so it is not possible to call a program unit when the user click on a field.
    In the Reports Online Help:
    Note: The ability to create a button in the Paper Layout view is no longer supported in Oracle Reports 10g. Use hyperlinks instead. If you open an existing report that contains buttons, the buttons will be converted into text items.
    Regards

  • How to use srw.run_report without userid parameter in 10g

    I have the following function which works fine when I supply the userid parameter.
    Is it possible to run srw.run_report without the userid? If not is there another way to run a batch report to create a file?
    create or replace
    FUNCTION SUNRESDS(vopersorjudicial varchar2)
    RETURN VARCHAR2 as
    myPlist SRW_PARAMLIST;
    myIdent SRW.Job_Ident;
    BEGIN
    myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
    srw.add_parameter(myPlist,'GATEWAY','http://xxx.xx.xxx.xx/reports/rwservlet');
    srw.add_parameter(myPlist,'SERVER','rep_172_FRHome1');
    srw.add_parameter(myPlist,'REPORT','d:\oracle\FRHome_1\forms\sunresds.jsp');
    srw.add_parameter(myPlist,'USERID','username/password@databasename');
    srw.add_parameter(myPlist,'DESTYPE','file');
    srw.add_parameter(myPlist,'DESFORMAT','PDF');
    srw.add_parameter(myPlist,'popersorjudicial',vopersorjudicial);
    srw.add_parameter(myPlist,'DESNAME','d:\Reports\unresolved_discrepancies.pdf');
    myIdent := srw.run_report(myPlist);
    return 'Y';
    EXCEPTION
    when others then
    return ('sunresds ' || sqlerrm);
    END;

    Did you solve your problem? How did you do?

Maybe you are looking for

  • Interactive Image Panning within a Mask

    Hey guys thanks for the help so far. The last piece to the puzzle for me is figuring out how to scroll a movie clip within a mask. I'm currently working with the script taken from the Interactive Image Panning tutorial on kirupa.com as a base. Right

  • Trading and Manufacturing

    Hi We have materials in our company that are both bought and produced. They will have the same material code and we dont use split valuation. For tax purposes we need a report that will identify these seperately i.e. material that is bought and how m

  • Last Price Report

    Hello experts, in a Sales order when doing ctrl+tab on the price after discount, a "Last price report" pops up with various selection criterias, do you know if we could get this report from the menu or somewhere else without having to go thu the SO?

  • How to stop Firefox messages on home screen?

    Since the last up-grade of Firefox for Android, I get unwanted pop-up messages at the foot of my browser 'Awesome' home page. the messages pretend to be helpful but they are just cheesy adverts for something or other e.g. 'Hey, if you want x, you sho

  • Podcast synching

    How do  I ensure that podcasts on mi iPad/iPhone will not be lost  when I synch with my computer? The same items have not been downloaded to my several devices and podcast synch has not transferred various episodes to all my devices. The podcasts are