User input with while

Hello all!
I'm kinda new to Java and especially to these forums. I know it's impolite to go into a community and ask for something straight away; but I really can't find a solution to my problem:
I'm trying to make a small hangman game with console user input. The code:
package mystupidjavaapp;
import java.util.*;
import java.awt.*;
public class MyStupidJavaApp
    public static void main(String[] args)
     Scanner console = new Scanner (System.in);
     System.out.println("Let's play hangman are you ready? ");
     String s = console.nextLine();
     DrawingPanel panel = new DrawingPanel(500, 400);
     Graphics g = panel.getGraphics();
     panel.setBackground(Color.white);
     drawingPanel(g);
     userInput(console, g, s);
    public static void drawingPanel( Graphics g)
        g.setColor(Color.black);
        g.drawLine(50, 50, 50, 70);
        g.drawLine(50, 50, 100, 50);
        g.drawLine(100, 50, 100, 150);
        g.drawLine(75, 150, 125, 150);
        g.drawString("Hello and welcome to a small sample of a hangman game!", 120, 50);       
    public static void userInput(Scanner console, Graphics g, String s)
       int roll=0;
       String word = "";
       while (!s.equals("yes"))
          console.next();
          System.out.println("Well if you can't say a simple \"yes\"  then we can't go on. ");
          s = console.nextLine();
         System.out.println("Nice! ");
         Random r = new Random();
         roll = r.nextInt(4)+1;
         if (roll == 1)
             word = "pu";
         else if (roll == 2)
             word = "copac";
         else if (roll == 3)
             word = "bani";
         else
             word = "casa";
      if (roll !=0)
          g.drawLine(150, 130, 200, 130);
       for (int i=0; i<=word.length()-1; i++)
          g.drawLine(150+i*70, 130, 200+i*70, 130);
      int tries=0, position=0, guess=0;
      while (tries <= 6 && guess<=word.length())
       System.out.println("Ok please input a letter(one letter at a time please): ");
       String s1 = console.next();
       char c = s1.charAt(0);
       for (int i=0; i<word.length(); i++)
             if (word.charAt(i) == c)
                 position = i;
                 System.out.println("Congratulations you got a letter right! ");
                 guess++;
                 if (position==1)
                    {g.setFont(new Font("SansSerif", Font.PLAIN, 40));
                     g.drawString(s1.substring(0,1), 170, 125);}
                 else if (position!=0)
                    {g.setFont(new Font("SansSerif", Font.PLAIN, 40));
                     g.drawString(s1.substring(0,1), 170+70*position, 125);}
             else
                 tries++;
}My main problem is with the "while (!s.equals("yes"))" part, where if I enter the loop it will never exit it. What to do? Also, I tried watching for variables but I dunno how to do that to be honest :(. (In Netbeans, I tried going in the top "Debug" menu and there I selected "New Watch" and I chose the variable I wanted. Sadly as I run my code, in the watch window my variable is unchanged; moreover it doesn't even receive a value)
Suggestions/ help anyone :S?

Hello!
Thanks for the reply and sorry for my late reply. I wanted to start out by watching the "tries" variable but I have no idea what I'm doing. i tried setting break points throughout my code but nothing seems to happen/change. I need a step by step tutorial on how to watch a variable "evolve" through my code. I know this is probably a nuisance but until I find a good tutorial on it, I dunno how to do it :(.
**QUICK EDIT**
I finally got it to work! The main problem started because I couldn't get all the letters to show up on the right spot or sometimes I couldn't get the letters to show up at all. But after staring at the code for awhile I decide to ditch the "if" that was generating the letters. Here's how it looks now and it works flawlessly! (In case some1 is curious.)
package mystupidjavaapp;
import java.util.*;
import java.awt.*;
public class MyStupidJavaApp
    public static void main(String[] args)
     Scanner console = new Scanner (System.in);
     System.out.println("Let's play hangman are you ready? ");
     String s = console.nextLine();
     DrawingPanel panel = new DrawingPanel(500, 400);
     Graphics g = panel.getGraphics();
     panel.setBackground(Color.white);
     drawingPanel(g);
     userInput(console, g, s);
    public static void drawingPanel( Graphics g)
        g.setColor(Color.black);
        g.drawLine(50, 50, 50, 70);
        g.drawLine(50, 50, 100, 50);
        g.drawLine(100, 50, 100, 150);
        g.drawLine(75, 150, 125, 150);
        g.drawString("Hello and welcome to a small sample of a hangman game!", 120, 50);       
    public static void userInput(Scanner console, Graphics g, String s)
       int roll=0;
       String word = "";
       while (!s.equals("yes"))
          console.next();
          System.out.println("Well if you can't say a simple \"yes\"  then we can't go on. ");
          s = console.nextLine();
         System.out.println("Nice! ");
         Random r = new Random();
         roll = r.nextInt(4)+1;
         if (roll == 1)
             word = "pu";
         else if (roll == 2)
             word = "copac";
         else if (roll == 3)
             word = "bani";
         else
             word = "casa";
          g.drawLine(150, 130, 200, 130);
       for (int i=0; i<=word.length()-1; i++)
          g.drawLine(150+i*70, 130, 200+i*70, 130);
      int tries=0, position=0, guess=0;
      while (tries <= 6 && guess<=word.length())
       System.out.println("Ok please input a letter(one letter at a time please): ");
       String s1 = console.next();
       char c = s1.charAt(0);
       for (int i=0; i<word.length(); i++)
             if (word.charAt(i) == c)
                 position = i;
                 System.out.println("Congratulations you got a letter right! ");
                 guess++;
                 g.setFont(new Font("SansSerif", Font.PLAIN, 40));
                 g.drawString(s1.substring(0,1), 170+70*position, 125);
             else
                 tries++;
          if (tries == 1)
              g.drawOval(40, 70, 30, 30);
          else if (tries == 2)
              g.drawLine(50, 100, 50, 140);
          else if (tries == 3)
              g.drawLine(50, 110, 20, 120);
          else if (tries == 4)
              g.drawLine(50, 110, 80, 120);
          else if (tries == 5)
              g.drawLine(50, 130, 20, 140);
          else if (tries == 6)
              g.drawLine(50, 130, 80, 140);
}Sadly I couldn't manage to understand how to use breakpoints :|.
Edited by: 890334 on Jan 23, 2012 1:53 PM

Similar Messages

  • How to control user input with a button?

    How do I control a user input from a dialog box by activating it with a button. I am saying "press zero", then when the user does press zero, it should zero the scale.

    The user has only one button they can press.  You should enable the cancel so that the dialog can output an F.  
    What you have works, but the zero will not occur until the case is activated.  If the insides of the case do not work, that is another story.  Put a pop up in the active case to convince yourself that the case is being entered.
    This, what you have, always returns T.
    Mark Ramsdale

  • User Input With SQL?

    Hi
    I need to create a query that uses user input as part of the query.
    Example:
    SELECT * FROM item
    WHERE designer = 'Gucci';
    The 'Gucci' part of the query needs to be user input every time the query is ran... Can you help?
    I've tryed the following, but it does not work....
    SELECT * FROM Item
    WHERE Designer like '&& Designer';
    All help appreciated, thanks.

    Hello,
    Try this and if you don't want to specify single quote then at the prompt user have to enter like 'Gucci'. And with the following statement user just have to enter Gucci at the prompt
    SELECT * FROM Item
    WHERE Designer like ('&Designer');Regards

  • Can't take User input with DataInputStream!!!

    public class DataInputStrm
         public static void main( String[] args ) {
              DataInputStream dIpStream = new DataInputStream( System.in );
                 try {
                   System.out.println( "Enter an integer" );
                   int anInteger = dIpStream.readInt();
                   // does not work
                   System.out.println( "You have entered " + anInteger );
              catch( java.io.IOException e ) {
                   e.printStackTrace();
         } // end of main
    } // end of class DataInputStrm/** Problems:
    1. If an one digit integer is entered( 2, 3 etc ), it is waiting for another!
         Does not happen for an integer with more than one digit.
    2. Displays garbage when the integer value is output.
    Please help immediately!

    DataInputStream/DataOutputStream provide a way of reading and
    writing complex objects in a way that works on all sorts of different
    computers.
    What you probably want is a Scanner. These things are designed
    to read relatively simple data only (numbers, strings, lines, boolean
    values etc) from just about any source (anything Readable).
    Here's your example, but using a Scanner:import java.util.Scanner;
    public class ScanEg
        public static void main( String[] args ) {
            Scanner in = new Scanner(System.in);
            System.out.println( "Enter an integer" );
            int anInteger = in.nextInt();
                // but what if it's not an integer...
            System.out.println( "You have entered " + anInteger );
    }Works fine, but you might want to consult the documentation to
    find out what happens if the user doesn't enter a number, or if
    there's an i/o error. The API documentation is here:
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
    Scanner is discussed in the tutorial here:
    http://java.sun.com/docs/books/tutorial/essential/io/scanning.html

  • Validate user input with the screen flow logic.

    Hello guys, im facing some troubles with the following code
    field mara-matnr SELECT *
                        from mara
                        into table itab_mara
                        where  matnr = mara-matnr
                        and  matnr = mara-matkl
                        WHENEVER NOT FOUND SEND ERRORMESSAGE 107
                                   WITH  mara-matnr .
    the editor doest recognize this code in PAI., is the same with VALUES clause. 
    what im doing wrong ? . thank you very mch.

    Hi,
    Please check code in where condition. Is the condition is right?
    field mara-matnr SELECT *
                        from mara
                        into table itab_mara
                        where  matnr = mara-matnr
                        and  matnr = mara-matkl
                        WHENEVER NOT FOUND SEND ERRORMESSAGE 107
                                   WITH  mara-matnr .
    MATNR is comparing with MATNR and also MATKL.
    When you are doing the valiation make sure that use the chain and endchain stamt.
    PAI
    CHAIN:
    MODULE VALI_DATA.
    END CHAIN.
    Like above do the code.

  • User input in flash with aspx server

    Hi so far I've created a flash file with user input with
    fields such as name and email. But now I need to find a way to
    script the input fields so that it would send those inputted
    information to an aspx.net server, and also respond to the user's
    input by saying "thank you" when the message is correctly sent.
    Please help me out, I am new to aspx.net and also new to how
    flash connects to server with action script coding. PLEASSSeEE
    helpppp

    Does the programmer want XML or URL Variables?
    For URL variables follow the example for
    LoadVars.sendAndLoad
    for XML follow the example for
    XML.sendAndLoad

  • Cannot Read user input on Adobe Form .

    Hi team,
    Can you please go through the issue -
    Developed Interactive Adobe form. Called by webdynpro application.
    Interactive properties enable, display type - native, with pdfsource, template source and data source cleanly populated.
    Submit button is webdynpro native with option CLICK and corresponding code selected in ADOBE FORM.
    All the elements in adobe forms cleanly binded and checked more than 10 times to avoid any mistakes or wrong bindings.
    Event handler code is written for submit button to read the data eneted by user on adobe form.
      lo_el_zleaver_form->get_static_attributes(
        IMPORTING
          static_attributes = ls_zleaver_form ).
    User is able to enter data on adobe form and control is comming to Submit button code but i am not able to read the user input with above code.
    BASIS has check and confirmed that license is installed properly. I am using adobe reader 9 and adobe designer 8.2 and will ECC version 6.0 . Basis has confirmed the ADS configuration, Java stack and ABAP stack are compatible.
    We are using the ADS from SAP NetWeaver 7.01 (EhP1, Java Stack) in
    combination with SAP NetWeaver 7.00 SP15 (ABAP stack).
    Mohan.

    Hi Guys,
    I also created one more Adobe interactive form to test and again USER INPUT CANNOT BE READ. After user click on SUBMIT button the below code is written in SUBMIT button. I am not able to read department details below enteted by user. Is there any othe method you want me to call. I also tried GET_ATTRIBUTE
    Will there be any problem with above version of ADS or ALD etc..
          DATA lo_nd_zdept TYPE REF TO if_wd_context_node.
          DATA lo_el_zdept TYPE REF TO if_wd_context_element.
          DATA ls_zdept TYPE wd_this->element_zdept.
        navigate from <CONTEXT> to <ZDEPT> via lead selection
          lo_nd_zdept = wd_context->path_get_node( path = `ADOBE.ZDEPT` ).
        @TODO handle non existant child
        IF lo_nd_zdept IS INITIAL.
        ENDIF.
        get element via lead selection
          lo_el_zdept = lo_nd_zdept->get_element( ).
        @TODO handle not set lead selection
          IF lo_el_zdept IS INITIAL.
          ENDIF.
        get all declared attributes
          lo_el_zdept->get_static_attributes(
            IMPORTING
              static_attributes = ls_zdept ).
    This is other interactive form where i also tried GET_ATTRIBUTE
    USING GET_ATTRIBUTE***************
      node_info = lo_nd_zleaver_form->get_node_info( ).
    I tried both GET_ATTRIBUTE and GET_ATTRIBUTES but failed.
      node_info->GET_ATTRIBUTES(
      RECEIVING
      ATTRIBUTES = stru_zleaver_Forms ) .
    OR
    lo_nd_zleaver_form = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ZLEAVER_FORM ).
      lo_EL_zleaver_form->GET_ATTRIBUTE( EXPORTING NAME  = 'LEAVES_TAKEN'
                               IMPORTING VALUE = LW_LEAVES_TAKEN ).

  • Help with JAVA StringObject - & assign user input; StringMethod

    Hi Everyone! I need help with this Java Program, I need to write a program, single class, & file. That will prompt the user to enter a word. The output will be separted by hypens and do this until the user enters exit. I think this is done by using a string variable. Then use the length of the word to setup a loop to print each letter out with hypens. (example c-a-t)
    1. I think I should store the word like this: Word.Method(). Not sure of this the API was confusing for me because I wasn't sure of what to do.
    2. A string method to find out how many letters are in the user's word in order to setup a loop to print each letter out. I think I can use a While loop to accomplish this?
    3. A string method to access each letter in a string object individually in order to print individual letters to the screen with those hypens. This is really confusing for me? Can this be accomplished in the While loop? or do I declare variables in the main method.
    Any examples you can refer me to would be greatly appreciated. Thanks

    Getting user input:
    This may look strange to a newbie but there's nothing much you can do since you wanted a single class file:import java.io.*
    public class InputTest {
       public static void main(String[] args) {
          BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
          System.out.println("Hi! Please type a word and press enter.");
          String lineReadFromUser = in.readLine();
          System.out.println("You typed " + lineReadFromUser);
    }You can get the lenght of a String using the length() method. Example: int len = "Foobar".length();
    You can get the individual characters of a String with the charAt() method. Example: char firstCharOfString = string.charAt(0);
    (remember that the argument must be from 0 to length-1)
    You can access the documentation of all classes, including java.lang.String, at http://java.sun.com/j2se/1.3/docs/api/index.html You can also download the docs.

  • Error "CONVT_NO_NUMBER" while performing user measurement with USMM

    Hi,
    While running user measurement with USMM I am getting following run
    time error.
    To be specific - After preselections in USMM->system measurement->while
    checking Green Check mark this error is screaming up.
    Ae per Note - 1230640 :- You call transaction USMM and want to cancel
    the user measurement using the cancel button (red 'X') on the dialog
    box of the user measurement. However, the measurement continues and is
    completed as if you had chosen the ok button (green check mark).
    Above note is applied if the problem comes if we check red button
    rather than green check mark.
    Please suggest us the best way to procees.
    ST22 details:-
    Runtime Errors CONVT_NO_NUMBER
    Exception CX_SY_CONVERSION_NO_NUMBER
    Date and Time 09/16/2008 07:42:32
    Short text
    Unable to interpret " 1,410 " as a number.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "RSUVM001" had to be terminated because
    it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to
    class 'CX_SY_CONVERSION_NO_NUMBER', was not
    caught and
    therefore caused a runtime error.
    How to correct the error
    Whole numbers are represented in ABAP as a sequence of numbers,
    possibly
    with an algebraic sign.
    The following are the possibilities for the representation of
    floating
    point numbers:
    [mantissa]E[algebraic sign][exponent]
    [whole number part].[fraction part]
    For example, -12E+34, +12E-34, 12E34, 12.34
    If the error occurred in your own ABAP program or in an SAP
    program you modified, try to remove the error.
    If the error occures in a non-modified SAP program, you may be able
    to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the
    following
    keywords:
    "CONVT_NO_NUMBER" "CX_SY_CONVERSION_NO_NUMBER"
    "RSUVM001" or "RSUVM001"
    "START-OF-SELECTION"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    Information on where terminated
    Termination occurred in the ABAP program "RSUVM001" - in "START-OF-
    SELECTION".
    The main program was "RSUVM001 ".
    In the source code you have the termination point in line 96
    of the (Include) program "RSUVM001".
    85 * Analyze the user records.
    86 CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    87 EXPORTING
    88 text = 'Die Benutzerstammsätze werden analysiert.'(002).
    89 * PERFORM analyze_user_records.
    90
    91 CALL FUNCTION 'SLIM_USER_MEASUREMENET'
    92 CHANGING
    93 SLIM_TUREP = LT_TUREP.
    94 .
    95 LOOP AT LT_TUREP INTO LS_TUREP .
    >>>>> MOVE-CORRESPONDING LS_TUREP TO ITUREP.
    97 APPEND ITUREP.
    98 ENDLOOP.
    99
    100 * Submit Application measurements as batch jobs.
    101 * Save additional data about this analysis in the DB.
    102 * we need meas-no ,v-date at the batch
    any ideas?

    Hi Srikanth,
    The below Notes helps you to solve the issue.
    Please review the below Notes.
    Note 1117010 - Runtime error CONVT_NO_NUMBER in RSUVM001
    Note 1115924 - USMM composite SAP Note: Problems after importimg new SPs
    Thanks & Regards,
    Pradeep Srigiri

  • Producer Consumer & User Events with user input windows

    Hello All,
    I am planning to build Labview code using the Producer Consumer & User events pattern, the application needs multiple user input windows for things like personal data, feature selection etc, there could be around 15 or 20 distincts screen/panels required.
    The main question from me is... Is there a best practive approach to navigating/loading from one window to another etc, and also providing a way to to retrun to the previous window.
    Also I may need need to be running some slow logging and control hardware in the background while navigating some of the screens, this seems like the producer consumer vi will be running in the background while the user input causes a load/display window event.
    A simple Producer Consumer multiple winjdoow example would be very welcome. Thanks.
    Regards Chris

    I will second Mike's suggestion to use a central VI with subpanel(s).  It is usually less confusing than multiple windows.  Typically, the selection/navigation mechanism is on the left of the main panel, global info (like help) on the right, and the subpanel(s) in the center.
    The advantage of subpanels/subVIs is that you can launch your subVIs and keep them active in the background, even though they are not being used.  This means they will keep their state information and load into the subpanel almost instantaneously the next time you need them.  For a short tutorial on subpanels, check out this link.  Scroll down to the fourth reply for working code.  The original code posted is broken.
    Communication between your VIs or loops is typically done with either queues or event structures.  State information in each should be shift registers in the respective VIs.  If you have the time, I would highly recommend you learn how to use LabVIEW classes.  The command pattern is tailor made for this kind of application.
    Finally, avoid global data if you can.  Global data is anything that you can get to from anywhere (globals, functional globals, etc.).  Use of these can speed your development, but can also lead to sloppy design which will cause you major problems later.  If you really need globally available data, use a data value reference.  It is unnamed and requires a reference, which tends to enforce better programming practice.  Yes, there are instances where you truly need globally available, named data, but they are fairly rare.  You should only use them if you are experienced and really know what you are doing.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How do you keep a VI running while waiting for user input?

    I have a VI that:
    1.  The user enters set points.
    2.  The user starts the VI and the VI sends the set points to an external process via a serial interface.
    3.  The VI  stops running.
    4   The user waits for the external process to complete.
    5.  Repeat sequence. Go to Step 1.
    This works well except for one small problem.  Starting the VI in step 2 causes an external micro controller to reset.  During the reset it will ignore set point commands.  To get around this problem a delay has been added between when the VI opens the serial port and when the VI sends the set points to the external process   Is it possible to keep a VI running continuously in this type of application, thereby eliminating the start up and shut down of the serial interface?
    If yes, how do you keep a VI running while waiting for user input?
    Howard

    The ones for the event structure specifically. I'm posting from my phone. Look at the basic ones for user input. even a simple while loop with a boolean and a case statement would work.

  • Calling report from a form with user input parameters

    Hello,
    I am new to Oracle reports. I have an application coded in 6i. I am currently running the application in Oracle Forms Builder 9i. There are also few reports which are called from the forms. Since the application was developed in 6i, the report was called using Run_Product. The forms pass a set of user parameters to the report using the parameter list pl_id. The syntax used was Run_Product(REPORTS, 'D:\Report\sales.rdf', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
    I learnt that the Run_product doesnt work in 9i and we need to use run_report_object. I have changed the code to use run_report_object and using web.show_document () i am able to run the report from the form. There are 2 parameters that need to be passed from forms to reports. The parameters are from_date and to_date which the user will be prompted to enter on running the form. In the report, the initial values for these parametes are defined. So, the report runs fine for the initial value always. But when i try to change the user inputs for the form_date and to_date, the report output doesnt seem to take the new values, instead the old report with the initial values(defined in the report) runs again.
    Can someone give me the code to pass the user defined parameters to the report from the forms? I have defined a report object in the forms node as REPTEST and defined a parameter list pl_id and added form_date and to_date to pl_id and used the following coding:
    vrepid := FIND_REPORT_OBJECT ('REPTEST');
    vrep := RUN_REPORT_OBJECT (vrepid,pl_id);
    But this doesnt work.
    Also, Should the parameters defined in the forms and reports have the same name?

    Thanks for the quick response Denis.
    I had referred to the document link before and tried using the RUN_REPORT_OBJECT_PROC procedure and ENCODE functions as given in the doc and added the following SET_REPORT_OBJECT_PROPERTY in the RUN_REPORT_OBJECT_PROC :
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    But this also dint work. Please help me understand what difference does setting paramform=no OR paramform=yes make?
    In the report, i have defined the user parameters as FROM_DATE and TO_DATE respectively so that they match the form datablock BLK_INPUT items FROM_DATE and TO_DATE.
    My WHEN_BUTTON_PRESSED trigger is as below:
    DECLARE
    report_id report_object;
    vrep VARCHAR2 (100);
    v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
    v_connect VARCHAR2 (30) := '&userid=scott/tiger@oracle';
    v_report_server VARCHAR2 (30) := 'repserver90';
    BEGIN
    report_id:= find_report_object('REPTEST');
    -- Call the generic PL/SQL procedure to run the Reports
    RUN_REPORT_OBJECT_PROC( report_id,'repserver90','PDF',CACHE,'D:\Report\sales.rdf','paramform=no','/reports/rwservlet');
    END;
    ... and the SET_REPORT_OBJECT_PROPERTY code in the RUN_REPORT_OBJECT_PROC procedure is as:
    PROCEDURE RUN_REPORT_OBJECT_PROC(
    report_id REPORT_OBJECT,
    report_server_name VARCHAR2,
    report_format VARCHAR2,
    report_destype_name NUMBER,
    report_file_name VARCHAR2,
    report_otherparam VARCHAR2,
    reports_servlet VARCHAR2) IS
    report_message VARCHAR2(100) :='';
    rep_status VARCHAR2(100) :='';
    vjob_id VARCHAR2(4000) :='';
    hidden_action VARCHAR2(2000) :='';
    v_report_other VARCHAR2(4000) :='';
    i number (5);
    c char;
    c_old char;
    c_new char;
    BEGIN
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
    hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
    hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);
    hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
    c_old :='@';
    FOR i IN 1..LENGTH(report_otherparam) LOOP
    c_new:= substr(report_otherparam,i,1);
    IF (c_new =' ') THEN
    c:='&';
    ELSE
    c:= c_new;
    END IF;
    -- eliminate multiple blanks
    IF (c_old =' ' and c_new = ' ') THEN
    null;
    ELSE
    v_report_other := v_report_other||c;
    END IF;
    c_old := c_new;
    END LOOP;
    hidden_action := hidden_action ||'&'|| v_report_other;
    hidden_action := reports_servlet||'?_hidden_server='||report_server_name|| encode(hidden_action);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
    -- run Reports
    report_message := run_report_object(report_id);
    rep_status := report_object_status(report_message);
    IF rep_status='FINISHED' THEN
    vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
    message('job id is'||vjob_id);pause;
    WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
    ELSE
    --handle errors
    null;
    END IF;
    In the code - " hidden_action := hidden_action ||'&'|| v_report_other; " in the RUN_REPORT_OBJECT_PROC procedure above, how do i make sure that the v_report_other variable reflects the user input parameters FROM_DATE and TO_DATE ??? v_report_other is initialised as v_report_other VARCHAR2(4000) :=''; in the procedure. Will ensuring that the v_report_other contains the user input parameters FROM_DATE and TO_DATE ensure that my report will run fine for the input parameters?
    Thanks in advance.
    Edited by: user10713842 on Apr 7, 2009 6:05 AM

  • ANN: 1/2-hr webinar (free), June 5 -- Enable and encourage user input in PDFs (viewed with Adobe Rea

    Enable and encourage user input in PDFs (viewed with Adobe Reader)
    with FrameMaker-to-Acrobat TimeSavers + Form Assistant
    Half-hour webinar (free; no fluff, no hype, no nonsense)
    Wednesday, June 5, starting 9am PDT
    Register at: https://www3.gotomeeting.com/register/157658438
    Enabling PDFs for various types of user input can strengthen the interaction between users and the content, and improve satisfaction due to greater user involvement/control. In addition, designated avenues for user input can contribute to documentation quality and provide outlet for frustration, for example by sending inputs regarding the documentation or the product directly from within the PDF.
    Techniques demonstrated in this webinar include features that are all embedded in PDFs that are viewed with the free Adobe Reader:
    • text fields where users can record data values and options
    • checkboxes to track progress
    • page marks and notes (optionally e-mailed)
    • embedded grading/feedback forms
    • storing of useful search queries within the PDF for future use
    Shlomo Perets
    MicroType, http://www.microtype.com
    FrameMaker/Acrobat/Captivate training & consulting • FM-to-Acrobat TimeSavers/Assistants

    https://crash-stats.mozilla.com/report/index/bp-0a0b872f-5127-4ee1-a355-ca3cb2120721
    https://crash-stats.mozilla.com/report/index/bp-9cd87dd7-205f-4844-9e6d-3ce262120721
    https://crash-stats.mozilla.com/report/index/bp-8c07c846-b2ed-4535-8db4-4ee072120720
    https://crash-stats.mozilla.com/report/index/bp-f29a89ed-f8b1-4a62-ba3e-983e22120720
    https://crash-stats.mozilla.com/report/index/bp-e16d2b91-0f7d-4e5a-9e25-255852120718
    https://crash-stats.mozilla.com/report/index/bp-1226c709-5f87-41c6-95d3-4310d2120718
    https://crash-stats.mozilla.com/report/index/bp-4de2a0da-dd36-4ec8-8e53-c42742120714
    https://crash-stats.mozilla.com/report/index/bp-e16d2b91-0f7d-4e5a-9e25-255852120718
    https://crash-stats.mozilla.com/report/index/bp-4de2a0da-dd36-4ec8-8e53-c42742120714
    https://crash-stats.mozilla.com/report/index/bp-eac1c5a5-2dce-4415-b645-07a1f2120714
    https://crash-stats.mozilla.com/report/index/bp-1ede5bd3-8c72-4362-8d79-4f29c2120714
    https://crash-stats.mozilla.com/report/index/bp-d4fd5dae-dacd-45f8-9549-2c3702120722
    https://crash-stats.mozilla.com/report/index/bp-ca510991-de29-44b3-be02-0255a2120722
    https://crash-stats.mozilla.com/report/index/bp-8600c221-3fd3-4eaa-a5af-a602b2120722
    With Hardware Accelaration in Flash turned off. Still crashing.

  • Date difference calculation with user input variable

    Hi,
    I have the following requirement in BEx:
    The user inputs a date value and I have to calculate the difference between the date entered by the user with the Due Date in the cube, to determine the number of backlog days. Basically, I need to calculate Past Due in number of days.  I need to display the Amount due for the Time buckets like 1 -10 days, 11 -30 days.
    The report output has to be in the format below:
    Columns:
    1 u2013 10 days Past Due      $100.00
    11 u2013 30 days Past Due    $15.00
    Rows:
    Customer#    
    The cube has data from Jan 2005 to June 2008.
    For Eg:   User Input Date =   04/30/2008.
    It should compare the input date to the due date for each record in the cube.
    Any suggestions are appreciated.

    Hi Kumar,
    We have developed simar reports in our previous projects.
    You need to follow the following steps.
    1. Create a new restricted key figure globally on Past Due $100. Restriction details I will let you know in the ensuing steps.
    2. Create another restricted key figure globally on Past Due $15. Restriction details I will let you know in the ensuing steps.
    3. Create a Z varuable on Calday and offset it -1 (use the button next to exclude button).
    4.Create another Z varuable on Calday and offset it -10 (use the button next to exclude button).
    5. Create another Z varuable on Calday and offset it -11 (use the button next to exclude button).
    6. Create another Z varuable on Calday and offset it -30(use the button next to exclude button).
    7 Restrict the RKF past due 100$ (defined in sl 1)between the variable range defined in 3 and 4.
    8. Restrict the RKF past due 15$ (defined in sl 2) between the variable range defined in 5 and 6
    Now drag and drop those two RKF to column and you will get the desired result in C1 and C2 as follows:
    Columns:
    C1 :1 u2013 10 days Past Due $100.00
    C2 :11 u2013 30 days Past Due $15.00
    If the above info serves your purpose, please reward me with the point.
    Regards,
    Subha

  • Open CC applications to default preferences with no user input

    I am searching for a way to open CC applications to default preferences with no user input. I understand there is a key board short cut (command/option/shift on start) but I am hunting for a way to have the preferences always revert to default. In the past I have written a script to delete the preference files upon computer start up but once again, it needs to be rewritten. Is there a method that does not require KLUDGE?

    Try:
    *http://kb.mozillazine.org/Preferences_not_saved

Maybe you are looking for

  • How to use multiple submit buttons in jsp form

    hello dextors, Im using a jsp page which have got some 'n' no submit buttons according to the Iterator ..each iterator display a row contains few fields plus submit button ..ex., If ' n' rows means 'n' respective submit buttons..the problem here is w

  • Function in stored procedure

    Hello, I'm using RPAD function in stored  procedure 4 times in one query and then inserting to another table. from dm_exec_sql_text table I see that every time that procedure approach to Rpad function it's open and closing in the and so it's open and

  • Problem starting ES Builder in PI 7.10

    Just installed PI 7.1 in a sandbox environment with Windows Server 2003 SP2 and MAXDB.  I have also followed the post-installation steps in the installation guide.  So far everything works except the Enterprise Service Builder.  When I clicked on the

  • Custom tag attribute values..

              hi,           I have created custom tags from my EJB using ejb2jsp tool. I tried the following,           1 works and the other doesn't,           a) This works.           <mytag:foo param1="<%="test"%>" />           b) this gives me a "Cla

  • How to diagnose Acrobat problem

    I've inherited/taken over my precursor's PC, which has FM 10 and CS 5.5 on. So far so good, but it didn't take long to hit a problem: Save as .pdf doesn't work :-{ I just get a couple of seconds' busy cursor, then a sort of bounce as though the entir