Printjob System Parameter...

Hi all,
I am calling a report from a form using run_product. I want to print it directly but want the printer dialog box should appear before printing. Tht can be done assigning parameter 'DESTYPE'='PRINTER' and 'PRINTJOB'='YES' but this is not working in my case. wht can be the problem?
Namrata

At 10g not 9i using a bean area on my canvas implementing the following class ...
import java.awt.Frame;
import java.awt.JobAttributes;
import java.awt.PrintJob;
import java.awt.Toolkit;
import javax.swing.JPanel;
import java.io.*;
import oracle.forms.ui.VBean;
public class Select_Printer extends VBean {
public Select_Printer()
     super();
public String getPrinterName()
String PrinterName=null;
          JobAttributes jobAttributes;
          try{
               jobAttributes = new JobAttributes();
               jobAttributes.setDialog(JobAttributes.DialogType.NATIVE);
               Frame dummyFrame = new Frame();
               PrintJob pJobDialog = Toolkit.getDefaultToolkit().getPrintJob(
               dummyFrame, "Printtest", jobAttributes, null);
               PrinterName = jobAttributes.getPrinter();
          } catch (Exception e) {
               System.out.println("Printer error!");
          return PrinterName;
public static void main(String[] args)
Select_Printer select_Printer = new Select_Printer();
System.out.println(select_Printer.getPrinterName() );
}

Similar Messages

  • How to create a system  parameter in Apex

    Hi friends,
    I am new to Oracle Apex and need to know how to create a System Parameter in Apex. Kindly let me know how to add one.
    Regards,
    Pradeep

    bluerose wrote:
    I am new to Oracle Apex and need to know how to create a System Parameter in Apex. Kindly let me know how to add one.
    using the privileges we can achieve this.Although I am not new to APEX I have no idea what you are talking about.
    What is "a System Parameter in Apex"? What "privileges" are used to create one?
    You'll find it easier to get help if you use terminology that is familiar to everyone...

  • Query using system parameter LEVEL returns incorrect huge number of records

    We migrate our database from Oracle *9.2.0.6* to *11.2.0.1*
    The query below throws "ORA-01788: CONNECT BY clause required in this query block".
    select * from (
    +select a.BOARD_ID, code, description, is_displayable, order_seq,  board_parent_id, short_description, IS_SUB_BOARD_DISPLAYABLE, <font color=blue>LEVEL</font> child_level, sp_board.get_parent_id(a.board_id) top_parent_id, is_top_selected isTopSelected+
    from boards a, ALERT_MESSAGE_BOARD_TARGETS b
    where a.board_id = b.board_id and is_displayable = 'Y' and alert_message_id = 5202) temp
    start with board_parent_id = 0
    connect by prior board_id = board_parent_id
    ORDER SIBLINGS BY order_seq;
    Based from online resources we modified "*_allow_level_without_connect_by*" by executing the statement.
    alter system set "_allow_level_without_connect_by"=true scope=spfile;
    After performing the above, ORA-01788 is resolved.
    The new issue is that the same query above returns *9,015,853 records in 11g* but in *9i it returns 64 records*. 9i returns the correct number of records. And the cause for 11g returning greater number of records is due to system parameter <font color=blue>LEVEL</font> used in the query.
    Why 11g is returning an incorrect huge number of records?
    Any assistance to address this is greatly appreciated. Thanks!

    The problem lies in th query.
    Oracle <font color=blue>LEVEL</font> should not be used inside a subquery. After <font color=blue>LEVEL</font> is moved in the main query, the number of returned records is the same as in 9i.
    select c.BOARD_ID, c.code, c.description, c.is_displayable, c.order_seq, c.board_parent_id, c.short_description, c.IS_SUB_BOARD_DISPLAYABLE, <font color=blue>LEVEL</font> child_level, c.top_parent_id, c.isTopSelected
    from (
    select a.BOARD_ID, code, description, is_displayable, order_seq, board_parent_id, short_description, IS_SUB_BOARD_DISPLAYABLE, sp_board.get_parent_id(a.board_id) top_parent_id, is_top_selected isTopSelected
    from boards a, ALERT_MESSAGE_BOARD_TARGETS b
    where a.board_id = b.board_id and is_displayable = 'Y' and alert_message_id = 5202
    ) c
    start with c.board_parent_id = 0
    connect by prior c.board_id = c.board_parent_id
    ORDER SIBLINGS BY c.order_seq

  • System Parameter - Destype

    Hi,
    I'm making a report in 6i. I have user parameters in my parameter form and I have added the system parameter 'destype' in my parameter form. I want to write a code so that when I choose 'File' in my destype, it should print it out as a txt file in some directory and also rename the name of the txt file according to my parameters.
    What should I write in my code in destype property palette under validation trigger.
    Pls advise as I'm very new in this.
    Thanks

    Hi,
    i was trying like this but my system parameters in report not getting assigned
    In a form i hv taken two text fields,output_type nd file_name which iam passing as a user parameter to a report to be generated in excel.
    In the report in the after parameter form trigger iam assigning the parameters to system parameters like this..
    if :destype = :p_output then
    :desformt := 'delimited';
    :desname := :p_filename;
    :destype := :p_output;
    return(true);
    end if;
    the process is executing fine but the system params
    :desformat etc..are not gettn assigned.. which is important. because
    i'll be changing the out_type and file_name from forms at runtime also
    i may choose output to be mail and execute the code accordingly.
    My question is can the system params be assigned like this or any other alt. method..
    pl let me know,
    regards,

  • Invalid system parameter of dispatchers

    Hi all,
    I set an invalid system parameter for dispatcher and I cannot startup the instance again.
    How can I change the system parameter before startup?
    I haven't backup the spfile, any other solutions?
    Regards,
    Jimmy

    start ur database with pfile
    sql>startup mount pfile=d:\oracle\product\10.1.0\admin\db01\pfile\init.ora
    sql> change ur dispatchers parameters if is not static.
    sql> alter database open;
    Listen to all other members.

  • Modifying the width of the DESNAME system parameter in Reports 6i

    This is probably so simple so I apologise for posting it here but I've been asked to look at an error with an Oracle Report (Reports 6i) (I've never really used Reports).
    When attempting to run the report, we get the following error :
    REP-0091: Invalid value for parameter 'DESNAME'.
    I think this is because the runtime value supplied for the DESNAME parameter exceeds the width property defined in the report. However, I cannot seem to modify the width property in Report builder.
    Can someone tell me how to modify the width property for the DESNAME system paramter ??

    Hi!
    I don't think it is possible to increase its width. It's a system parameter which can have several pre-defined or user-defined values. Check the documentation or help regarding this.
    Also, I think you can check several things.
    1. Check "Report Triggers" if any. DESNAME can be modified there. Menu item "Program" --> "Find and replace in PL/SQL..." can help to search the code.
    2. But more likely, incorrect value of DESNAME is passed into report from a calling module or batch script, or whatever. It can be a RUN_PRODUCT call in forms, or RWRUN60 in script. Check DESNAME there.
    3. Try to debug. Use srw.message to display DESNAME value at report startup, for instance in "before parameter form" trigger.
    Regards,
    Andrew Velitchko
    BrainBench MVP for Developer/2000
    http://www.brainbench.com

  • System parameter selection for iView

    Hi Expert,
                    While I'm creating iView in BEx Web Applications Parameters
    In System  parameter i am selection the "SAP_BW" the iVew is not working it showing me error "500 Internal Server Error"
    but, if i am selecting the "Local system" the iVew is working properly.
    Tell me how rectify that error.
    Thanks and Regards
    Lalit Kumar

    Dear Lalit,
    While iView creation if you are selecting the required version of BEx Web: BEx Web Application iView (SAP BW 3.x format) then the System Alias needs to be provided as 'SAP_BW'or the one which you have created. If the  BEx Web Application iView (SAP NetWeaver 7.0 format) is used then we have to use "Local system" as the system property value.
    In your case I think you are using the SAP NetWeaver 7.0 format for the BEx Web Application iView and thus you need to use "Local system" and if you want to use 'SAP_BW' as system alias then you should use the SAP BW 3.x format for the iview.
    For more information you ca refer this [link|http://help.sap.com/saphelp_nw70/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/content.htm].
    Hope this helps!
    Regards,
    Samir

  • Com.sap.ip.bi.bex IView - SYSTEM parameter in Portal

    Dear Experts,
    We are calling the iview com.sap.ip.bi.bex from the Portal system passing the parameters u201CSystemu201D and u201CTemplateu201D to invoke BI queries in a BI 7 system.
    eg: http://<sap portal server>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?System=BISystemAlias&TEMPLATE=ZYQ_PD_LOGISGENEX
    But we find diferences if we use uppercase or lowercase letters in the parameter u201CSystemu201D across our landscape.
    Development Portal System
    SYSTEM => Error (#1.5#00145E23B5DD007200000028000014240004987887685067#1293543342088#com.sap.ip.bi.base.exception.BIBaseRuntimeException#sap.com/irj#com.sap.ip.bi.base.exception.BIBaseRuntimeException#YP05914#3173##n/a##593456c6128711e0bd5b00145e23b5dd#SAPEngine_Application_Thread[impl:3]_5##0#0#Error##Plain###Exception thrown: com.sap.ip.bi.base.exception.BIBaseRuntimeException: Unknown Error) => Portal System Error
    System => OK
    system => Error (#1.5#00145E23B5DD00630000008900001424000498788A81C074#1293543394086#com.sap.ip.bi.base.exception.BIBaseRuntimeException#sap.com/irj#com.sap.ip.bi.base.exception.BIBaseRuntimeException#YP05914#3242##n/a##7bd9384b128711e0c7b300145e23b5dd#SAPEngine_Application_Thread[impl:3]_17##0#0#Error##Plain###Exception thrown: com.sap.ip.bi.base.exception.BIBaseRuntimeException: Unknown Error) => Portal System Error
    QA Portal System
    SYSTEM => OK
    System => OK
    system => OK
    Production Portal System
    SYSTEM => OK
    System => Error (Internal error. No esid found) => This is a BI System Error
    system => OK
    This issue is strongly bothering us, since we cannot transport from Development to Production because they behave differently.
    Any ideas?
    Thanks in advance,
    Fede

    Dear Pramod and N Bansal,
    Thank you very much for your help!
    Finally my problem was solved. The problem was never about the parameter, as we thought initially. When we used SYSTEM, Portal didn't recognize de parameter, and it only worked because when the parameter is spelled wrong (or it's absent), the BI Master System is used.
    The correct parameter is (and it always was) "System".
    Moreover, we realized that it's not enough to define the alias of the referenced BI system in the Portal System. It's also mandatory to define that same alias in the default system that is created in the installation of the BI system (located at pcd:portal_content/Systemlandscape/SAP_BW of the BI System).
    I hope this could help others having the same problem.
    Thanks again for your help.
    Fede

  • Any system parameter can do what "no_merge" do?

    We are trying to move the database to a new server and get performance hit. This is a simple query but with OWM we have more than 10 years historical data in LT tables.
    1. With just ordered hint, it takes 6:30 mins to run
    SELECT /*+ ordered*/  COUNT (a.id)
      FROM slimdba.neighbourhoods b,slimdba.zoning_polygons a
    WHERE   b.id = 170
       AND sdo_relate (a.geometry, b.geometry,  'mask=INSIDE+COVEREDBY+EQUAL querytype=WINDOW' ) = 'TRUE';
    2. With parallet hint, it takes 1:05 mins to run
    SELECT  /*+ full(b) parallel(b,8) */ COUNT (a.id)
      FROM slimdba.neighbourhoods b,slimdba.zoning_polygons a
    WHERE   b.id = 170
       AND sdo_relate (a.geometry, b.geometry,  'mask=INSIDE+COVEREDBY+EQUAL querytype=WINDOW' ) = 'TRUE';
    3. With no_merge(b) hint, it only process the current live data in b, it takes only 4 seconds
    SELECT  /*+ ordered no_merge(b) */ COUNT (a.id)
      FROM slimdba.neighbourhoods b,slimdba.zoning_polygons a
    WHERE   b.id = 170
       AND sdo_relate (a.geometry, b.geometry,  'mask=INSIDE+COVEREDBY+EQUAL querytype=WINDOW' ) = 'TRUE';
    In most of the cases our users only care about live data. Is there a system level setting to ask Oracle to filter the live data first instead of using LT table first then filter after the spatial process?
    Thanks a lot for any help!!
    Sharon

    Hi Sharon,
    I have previously seen this type of performance with spatial operators.  It is a result of the optimizer choosing to apply the spatial operator prior to determining the single row being seen from the neighbourhoods view.  In this example, there are most likely many rows with id=170 in the underlying _LT table, but only a single row will be ultimately seen from the slimdba.neighbourhoods view.  If the optimizer finds the single row prior to applying the spatial operator, then performance is very good.  If on the other hand, it finds all of the rows with id=170, applies the operator, and then filters that set to the one row being seen by the view, the performance has the tendency to be slow and it's directly proporational to the number of rows with id=170 in _LT.
    We have seen good performance transforming the query into the following.  This typically will force the slimdba.neighbourhoods view to be fully materialized prior to applying the spatial operator.  However, it does require rewriting the query.
    SQL> with n as (select /*+ materialize */ geometry from slimdba.neighbourhoods where id = 170)
             select count(id)
             from slimdba.zoning_polygons a, n b
             where sdo_relate (a.geometry, b.geometry,  'mask=INSIDE+COVEREDBY+EQUAL querytype=WINDOW' ) = 'TRUE';
    Using the NO_MERGE hint as you have done, is also an option.  The important point is that the optimizer evaluates the version predicates(the view logic) prior to applying the spatial domain index.  Any additional hints, change in optimizer parameters that achieves this goal can be used.
    If changing the query is not possible, and it was working as expected on the previous server then I would need to know additional information.  Has the RDBMS version changed in the process of switching servers or remained the same?  Are the statistics the same on both?  There isn't any Workspace Manager specific parameter that would cover this situation as the optimizer is ultimately responsible for the sql plan.  There is the capability to explicitly add a hint to the underlying view, but that is typically something that we do not recommend in this case as the hint would be there even for queries that it doesn't make sense for.
    Regards,
    Ben

  • System Parameter

    Hi All,
    Can anyone explain me where we will mention the forecast period and history to be considered for forecasting in Demantra.
    For example i might have sales history data of 01/01/2002 to 31/03/2009. I would consider only last 6 months sales history (in this case say 01/10/2008 to 31/03/2009) for forecasting next 9 months (01/04/2009 to 31/12/2009). Where will i mention the sales history dates and foreacast dates in demantra?
    Thanks in advance.
    Thanks & Regards
    DM

    Hi DM,
    You can give the start date in start_date parameter.
    So, it will make use of data between start_date and last_date parameter for forecasting calculation.
    Hope it is clear for you.
    Forecastgenerationhorizon is to generate forecast in backward days from max_sales_date parameter.
    If forecastgenerationhorizon is 2 weeks, max_sales_date is todays date, then forecast will get generated from 7/4/09 (2 weeks back from todays date).
    History length: if you are not giving start_date parameter, you can give history length for forecasting calculation.
    If you give history length as 2 weeks, last_date - todays date, then for forecasting calculation, system will consider history between 07/04/09 to todays date.
    As mentioned earlier, after doing so if you are still not getting the desired output, many other related parameters need to be checked.
    Hope your question is answered.
    Tks
    M J

  • How to get USERID system parameter in the report

    I can pass the user id, password and connect string through the USERID parameter, but how do I get it in the report? (I need to pass the USERID to a different report, I got a error when I use :USERID). Thanks.
    WJ

    There are two steps I used with which to get USERID into the report.
    1) Create a user parameter, P_USER, datatype CHARACTER, width 20
    2) in Report Trigger AFTER PARAMETER FORM (could also be BEFORE REPORT), insert the following line of code:
    :P_USER := USER;
    Now you can create an F_USER variable with P_USER as its source and place it in the report as you would with any other user parameter.
    Regards,
    Steve

  • Cannot connect to Database: ORA-01078: failure in processing system paramet

    Hi,
    i just installed Oracle Database XE 10g. But i cannot connect to the database. I'm trying to connect to the database with sqlplus.
    After searching for some log files i found the log-file oradim.log where i get the following error messages:
    Tue Jul 18 14:36:25 2006
    <INSTALLDIR>\app\oracle\product\10.2.0\server\bin\oradim.exe -startup -sid xe -usrpwd * -log oradim.log -nocheck 0
    Tue Jul 18 14:36:25 2006
    ORA-01078: failure in processing system parameters
    ORA-01565: error in identifying file '<INSTALLDIR>\app\oracle\product\10.2.0\server\dbs/spfileXE.ora'
    ORA-27041: unable to open file
    OSD-04002: Datei kann nicht geöffnet werden
    O/S-Error: (OS 2) Das System kann die angegebene Datei nicht finden.
    Any help is highly appreciated.
    Thank you in advance.
    Yuecel

    Installation finished successfully. No error messages at all.
    Was my first install and it did never work. I tried to reinstall a few time (with and without firewall etc.), but still not working.
    I did not change anything after install. Just opened sqlplus console and tried to connect to the database.

  • Problem when using the Http TimeOut system parameter in JDK 1.4

    Hi,
    The JDK 1.4 URLConnection class seems to be caching the timeout values in JDK 1.4. Hence this result in a inflexibility of setting the timeout value once for the entire functioning of the JVM. The sample code is below
    public class TestUrlConnection {
         * main method
         * @param args
         public static void main(String[] args) throws Exception {
              try {
                   System.setProperty("sun.net.client.defaultReadTimeout","1000");
                   System.out.println("Testing Connection Timeout Parse I");
                   URL url =
                        new URL("http://localhost:9080/StrutsApplicationWeb/timeOutTest.do");
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   System.out.println("Conn Type:" + conn.getContentType());
                   System.out.println("Conn Encoding:" + conn.getContentEncoding());
                   System.out.println("Conn Resp Code:" + conn.getResponseCode());
              } catch (SocketTimeoutException se) {
                   System.out.println("Timeout parse I");
              try {
                   System.setProperty("sun.net.client.defaultReadTimeout","25000");
                   System.out.println("Testing Connection Timeout Parse II");
                   URL url =
                        new URL("http://localhost:9080/StrutsApplicationWeb/timeOutTest.do");
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   System.out.println("Conn Type:" + conn.getContentType());
                   System.out.println("Conn Encoding:" + conn.getContentEncoding());
                   System.out.println("Conn Resp Code:" + conn.getResponseCode());
              } catch (SocketTimeoutException se) {
                   System.out.println("Timeout parse II");
    The server is a URL that produces an delay of 20 secs. Hence as per above code the first parse should fail but the second one should succeed. As URLConnection is caching the timeout value, the code is not functioning properly. Do you guys think, it is ok for URLConnection to cache timeout values???

    that is odd. I thought I saw the source to
    HttpURLConnection once, and the default timeout is
    hardcoded in the code, so there was no way of setting
    the time out. maybe right, i saw that setting a system property the second time dint seem to alter the value, but made the mistake of assuming that the connection picked up the timeout value first time from the system property the first time it was defined
    >
    1.5 changes this.setConnectionTimeout(int)

  • Urgent : Changing System Parametes

    Hello,
    How do we change system parameters in 6i reports during run time or at the beginning of the report design?
    Regards,
    Dinesh.

    Hi;
    please check below which could be helpful for your issue:
    Oracle Reports 6i Setup Guide for Oracle Applications 11i [ID 189708.1]
    http://www.stoneedge.com/help/OM_DOC/sys_parameter/Reports_System_Parameters_.html
    Regard
    Helios

  • Where to set Java system parameter for embedded WLS in JDev 11g?

    Hi,
    I am trying to test web service invocation via JAX-WS proxy generation on Jdeveloper 11g.
    When I test client code, I got following error message.
    Exception in thread "main" java.lang.Error: Jaxrpc 1.1 method is not supported.
         at weblogic.webservice.core.rpc.ServiceFactoryImpl.loadService(ServiceFactoryImpl.java:65)
    From a forum discussion, it was suggested to add following java parameter in the path.
    -Ddebug=true -Djavax.xml.rpc.ServiceFactory=oracle.j2ee.ws.client.ServiceFactoryImpl -Djavax.xml.soap.SOAPConnectionFactory=oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnectionFactory -Djavax.xml.soap.SOAPFactory=oracle.j2ee.ws.saaj.soap.SOAPFactoryImpl-Dweblogic.log.Log4jLoggingEnabled=true -Djbo.debugoutput=console
    I can not find where to set this parameter under "Tools"->"Preferences". Is there any place in IDE that I can set this value?
    Thanks for the help,
    Jim

    The parameters are defined in the Run configuration of your application. You find the Run configuration in the project properties under run. Open the 'Default' configuration, there you find the java properties where you put the parameters.
    Timo

Maybe you are looking for

  • Not able to transmit Video

    Hi, I m new to JMF.We are using MjSIP and i want to transmit video through JMF to other machine.The problem is the implementation which is given in MjSIP isnt working . I mean whenever i execute the implementation given in mjSIP like JVisualReceiver

  • Adobe photoshop cs4

    please help I have adobe photoshop cs4 and when i enter the disk to install it does nothing . whats the problem - i did have a trial version on it b4 would this have anything to do with it, if so how ca i fix it ?

  • I accidentally unchecked "Tap to Click" on the Trackpad preferences and now I can't click on anything!

    I accidentally unchecked "Tap to Click" on the Trackpad preferences and now I can't click on anything!

  • !!!Help!!! Cells have extra bottom space

    My site has a header. This header is a table formed by 1 row and 2 cells. One of the cells has only one image, but the other has a nested table with two other cells, having, each one, one image. Anyway, this is what my header is looking like: See thi

  • Adobe Creative Suite 5.5 Design standard deactivate and activate

    Hello, I did not deactivate my previous copy off Adobe CS 5.5 as my computer was wiped clean. No i have a new computer and it cant be activated. Anyways i can get over this hump? Thanks in advance