Adding user-defined number of text fields.

Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 20 and then okay in the first window.
The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
Feel free to run the program, the problem lies in the method setTextFields(). Help please!
import javax.swing.*;               //FOR SWING COMPONENT CLASSES
import java.awt.*;                  //FOR CONTAINER CLASS
import java.awt.event.*;            //FOR EVENT HANDLING
public class RegressInput extends JFrame
    private JComboBox listJComboBox;        //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
    private JButton answerButton;           //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
    private JPanel textFieldTopPanel;       //TEXT FIELD TOP PANEL
    private JPanel textFieldBottomPanel;    //TEXT FIELD BOTTOM PANEL
    private JPanel textFieldPanel;           //TEXT FIELD PANEL   
    private CardLayout cardSelector;        //DECLARE CARD LAYOUT OBJECT   
    private JPanel cardDeck;                //DECLARE CARD PANEL OBJECT
    public RegressInput(String title)
        super(title);               //CALL SUPERCLASS CONSTRUCTOR
        //CREATE A CONTAINER
        Container container = getContentPane();
        //INSTANTIATE CARD LAYOUT OBJECT
        cardSelector = new CardLayout();
        //INSTANTIATE PANEL OBJECT
        cardDeck = new JPanel();
        //SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
        cardDeck.setLayout(cardSelector);
        //DEFINE LABEL FOR FIRST CARD
        Label question = new Label("How many PAIRS of data would you like to enter?");
        //BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
        answerButton = new JButton("OK");
        listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
        listJComboBox.setMaximumRowCount(10);       //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
        Label xValues = new Label("X Values");      //LABEL FOR X values
        Label yValues = new Label("Y Values");      //LABEL FOR Y values
        //BUILD CARD DECK
        JPanel comboBoxCard = new JPanel();     //CREATE FIRST CARD
        comboBoxCard.add(question);             //ADD question LABEL TO FIRST CARD
        comboBoxCard.add(listJComboBox);        //ADD listJComboBox TO FIRST CARD
        comboBoxCard.add(answerButton);         //ADD answerButton TO FIRST CARD
        textFieldTopPanel = new JPanel();       //CREATE TOP PANEL OF SECOND CARD
        textFieldTopPanel.add(xValues);         //ADD xValues Label TO SECOND CARD
        textFieldTopPanel.add(yValues);         //ADD yValues Label TO SECOND CARD
        textFieldBottomPanel = new JPanel();    //CREATE BOTTOM PANEL OF SECOND CARD
        textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));    //SET LAYOUT FOR BOTTOM PANEL
        textFieldPanel = new JPanel();          //CREATE PANEL FOR SECOND CARD
        textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
        textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
        textFieldPanel.add(textFieldBottomPanel, "South");  //ADD textFieldBottomPanel TO SOUTH
        cardDeck.add(comboBoxCard, "Step 1");       //ADD FIRST CARD TO DECK
        cardDeck.add(textFieldPanel, "Step 2");     //ADD SECOND CARD TO DECK
        container.add(cardDeck);                    //ADD CARD DECK TO CONTAINER
        //DEFINE BUTTON HANDLER OBJECT
        ButtonHandler buttonHandler = new ButtonHandler();
        //ADD ACTION LISTENER FOR BUTTONS
        answerButton.addActionListener(new ButtonHandler());
    }//END RegressInput() CONSTRUCTOR
    //METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
    private String[] getArray()
        //CREATE ARRAY TO HOLD 30 VALUES
        int numbers[] = new int[29];
        //CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
        int number = 2;
        //ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
        for(int count=0; count < 29; ++count)
            numbers[count] = number;        //SETS EACH INDEX TO number
            number++;                       //INCREMENTS number
        }//END for LOOP
        //CREATE pairs[] ARRAY TO HOLD 30 STRINGS
        String pairs[] = new String[29];
        //ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
        for(int count = 0; count < 29; ++count)
            pairs[count] = "" + numbers[count];
        }//END for LOOP
        return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
    }//END getArray() METHOD8
    //RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
    private int getValue()
        //ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
        Integer v = new Integer((String) listJComboBox.getSelectedItem());
        //ASSIGNS WRAPPER VALUE TO int
        int value = v.intValue();
        //RETURN VALUE OF SELECTED ITEM
        return value;
    }//END getValue()
    private void setTextFields()
    {//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
        for(int count = 0; count < (2 * getValue()); ++count)
    }//END setTextFields()
    //BUTTON EVENT HANDLER CLASS
    private class ButtonHandler implements ActionListener
     //PROCESS EVENT
        public void actionPerformed(ActionEvent e)
            //WHICH BUTTON CAUSED THE EVENT?
            if(e.getSource() == answerButton)
                cardSelector.last(cardDeck);
                cardDeck.setSize(600,600);
            }//END if STATEMENT
        }//END actionPerformed()
    }//END ButtonHandler CLASS
}//END RegressInput CLASSHere is main:
import javax.swing.JFrame;
public class TestSharpStats
     public static void main(String[] args)
        //DEFINE FRAME OBJECT
        RegressInput window = new RegressInput("Hi");     //SETS TITLE BAR
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      //CLOSES WINDOW
        window.setSize(400, 600);    //SET FRAME SIZE
        window.setResizable(true);  //PREVENTS USER FROM RESIZING WINDOW
        window.setVisible(true);     //SETS window TO VISIBLE
    }//END main()
}//END TestSharpStats CLASS

muit-post: http://forum.java.sun.com/thread.jspa?messageID=4442652

Similar Messages

  • Unable to define Radio Button Text field & unable to change column position

    Hi,
    While designing a screen in Screen Painter, I am unable to define Radio Button Text field as this option is not there in Graphical Element. And also I want to specify the starting position of column of that element different from the default value, but I am unable to define that because the field is non-editable.
    Can any one please help me out.
    Regards,
    Koushik

    Hi,
    Please find below the sample program from ABAP docu :
    PROGRAM demo_dynpro_input_output.
    DATA: input  TYPE i,
          output TYPE i,
          radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
          box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.
    CALL SCREEN 100.
    MODULE init_screen_100 output.
      CLEAR input.
      radio1 = 'X'.
      CLEAR: radio2, radio3.
    ENDMODULE.
    MODULE user_command_0100 input.
      output = input.
      box1 = radio1.
      box2 = radio2.
      box3 = radio3.
      IF exit NE space.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    Here radio1(1) TYPE c is defined within the program but in the element list there are RADIO1 element exist. One is actual radio button and the other is Radio Button Text.
    I am not able to create that radio button text using same object name.
    Please suggest.
    Regards,
    Koushik

  • User defined Number range for TD Bulk Shipments

    Hello,
    By defining Customer specific logic with certain conditions through Z table, can we have a user defined Number range for TD Bulk Shipments? As SAP std. either we can have internal number range or external. If external is opted for, then every time User has to specify the same while creating a Shipment in O4F1. There is a every chance that Users will commit mistakes. In order to avoid this can we have something automatic (i.e. System will take care).
    e.g. In SD Billing we have one User exit:- USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ). With this and depending upon certain conditions (which are maintained in Z table) we can have our own number range.
    Similarly, Can any one please suggest either a User Exit or  BAdi or some enhancement point for this requirement?
    Regards,
    Aniruddha.
    Edited by: Aniruddha Saraf on Jan 3, 2008 2:28 PM

    Hi Anirudhdha,
    There is no standard exit for number ranges like those in SD. However, you can try using the exit EXIT_SAPMOIGS_001 for this purpose. You will still need to enter internal number range in the shipment type configuration.
    Hope this helps,
    Regards,
    Ashutosh

  • Adding user defined field in print layout design of Bill of matrial Report

    I want to add "Drawing No" which is user defined field in Bill of Material report need immediate help .

    Hi,
    If you add the UDF in BOM-Title then the UDF will be in OITT table.
    If you add the UDF in BOM-Rows then the UDF will be in ITT1 table.
    You will find BOM-Title or BOM-Rows in Production Module (ie., in User Defined Fields --> Manage User Fields)
    In PLD, You can print the UDF if you search in the above said tables.
    Raja.S

  • Adding user-defined data

    Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
    First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 30 and then okay in the first window.
    The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
    Feel free to run the program, the problem lies in the method setTextFields(). Help please!
    import javax.swing.*;               //FOR SWING COMPONENT CLASSES
    import java.awt.*;                  //FOR CONTAINER CLASS
    import java.awt.event.*;            //FOR EVENT HANDLING
    public class RegressInput extends JFrame
        private JComboBox listJComboBox;        //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
        private JButton answerButton;           //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
        private JPanel textFieldTopPanel;       //TEXT FIELD TOP PANEL
        private JPanel textFieldBottomPanel;    //TEXT FIELD BOTTOM PANEL
        private JPanel textFieldPanel;           //TEXT FIELD PANEL   
        private CardLayout cardSelector;        //DECLARE CARD LAYOUT OBJECT   
        private JPanel cardDeck;                //DECLARE CARD PANEL OBJECT
        public RegressInput(String title)
            super(title);               //CALL SUPERCLASS CONSTRUCTOR
            //CREATE A CONTAINER
            Container container = getContentPane();
            //INSTANTIATE CARD LAYOUT OBJECT
            cardSelector = new CardLayout();
            //INSTANTIATE PANEL OBJECT
            cardDeck = new JPanel();
            //SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
            cardDeck.setLayout(cardSelector);
            //DEFINE LABEL FOR FIRST CARD
            Label question = new Label("How many PAIRS of data would you like to enter?");
            //BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
            answerButton = new JButton("OK");
            listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
            listJComboBox.setMaximumRowCount(10);       //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
            Label xValues = new Label("X Values");      //LABEL FOR X values
            Label yValues = new Label("Y Values");      //LABEL FOR Y values
            //BUILD CARD DECK
            JPanel comboBoxCard = new JPanel();     //CREATE FIRST CARD
            comboBoxCard.add(question);             //ADD question LABEL TO FIRST CARD
            comboBoxCard.add(listJComboBox);        //ADD listJComboBox TO FIRST CARD
            comboBoxCard.add(answerButton);         //ADD answerButton TO FIRST CARD
            textFieldTopPanel = new JPanel();       //CREATE TOP PANEL OF SECOND CARD
            textFieldTopPanel.add(xValues);         //ADD xValues Label TO SECOND CARD
            textFieldTopPanel.add(yValues);         //ADD yValues Label TO SECOND CARD
            textFieldBottomPanel = new JPanel();    //CREATE BOTTOM PANEL OF SECOND CARD
            textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));    //SET LAYOUT FOR BOTTOM PANEL
            textFieldPanel = new JPanel();          //CREATE PANEL FOR SECOND CARD
            textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
            textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
            textFieldPanel.add(textFieldBottomPanel, "South");  //ADD textFieldBottomPanel TO SOUTH
            cardDeck.add(comboBoxCard, "Step 1");       //ADD FIRST CARD TO DECK
            cardDeck.add(textFieldPanel, "Step 2");     //ADD SECOND CARD TO DECK
            container.add(cardDeck);                    //ADD CARD DECK TO CONTAINER
            //DEFINE BUTTON HANDLER OBJECT
            ButtonHandler buttonHandler = new ButtonHandler();
            //ADD ACTION LISTENER FOR BUTTONS
            answerButton.addActionListener(new ButtonHandler());
        }//END RegressInput() CONSTRUCTOR
        //METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
        private String[] getArray()
            //CREATE ARRAY TO HOLD 30 VALUES
            int numbers[] = new int[29];
            //CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
            int number = 2;
            //ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
            for(int count=0; count < 29; ++count)
                numbers[count] = number;        //SETS EACH INDEX TO number
                number++;                       //INCREMENTS number
            }//END for LOOP
            //CREATE pairs[] ARRAY TO HOLD 30 STRINGS
            String pairs[] = new String[29];
            //ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
            for(int count = 0; count < 29; ++count)
                pairs[count] = "" + numbers[count];
            }//END for LOOP
            return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
        }//END getArray() METHOD8
        //RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
        private int getValue()
            //ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
            Integer v = new Integer((String) listJComboBox.getSelectedItem());
            //ASSIGNS WRAPPER VALUE TO int
            int value = v.intValue();
            //RETURN VALUE OF SELECTED ITEM
            return value;
        }//END getValue()
        private void setTextFields()
        {//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
            for(int count = 0; count < (2 * getValue()); ++count)
        }//END setTextFields()
        //BUTTON EVENT HANDLER CLASS
        private class ButtonHandler implements ActionListener
         //PROCESS EVENT
            public void actionPerformed(ActionEvent e)
                //WHICH BUTTON CAUSED THE EVENT?
                if(e.getSource() == answerButton)
                    cardSelector.last(cardDeck);
                    cardDeck.setSize(600,600);
                }//END if STATEMENT
            }//END actionPerformed()
        }//END ButtonHandler CLASS
    }//END RegressInput CLASS
    Here is main:
    import javax.swing.JFrame;
    public class TestSharpStats
         public static void main(String[] args)
            //DEFINE FRAME OBJECT
            RegressInput window = new RegressInput("Hi");     //SETS TITLE BAR
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      //CLOSES WINDOW
            window.setSize(400, 600);    //SET FRAME SIZE
            window.setResizable(true);  //PREVENTS USER FROM RESIZING WINDOW
            window.setVisible(true);     //SETS window TO VISIBLE
        }//END main()
    }//END TestSharpStats CLASS

    If your teacher taught you to program like this they should be shot. There is no need to comment every single line (especially in upper case). The comments stand out more that the code does and doesn't add any usefull information. Obviously comments are important, but you need to pick and choose when to use them.
    Swing related questions should be posted in the Swing forum.
    Also, don't use AWT components in a Swing application. Label is AWT. JLabel is Swing.
    I would use a JTable to input the matching pairs of data. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Table to get started.

  • Checking/Validating user input in a text field

    How can I validate a user's input in a text field and require them to input it in the following format:
    AAA 9999-999
    (where A can be letters and 9 can be numbers)
    Is there any documentation on how to validate user inputs in this manner?
    Thanks!
    BoilerUP

    Hi,
    Create a validation PL/SQL process, select Function returning Error and use something similar to the example below.
    I tested it but may be I missed something. I used field name P1_TEST.
    DECLARE
    v_number NUMBER;
    v_error VARCHAR2(1000);
    BEGIN
    --check if you have numbers in positions 5-8 and 10-12
    v_number:=SUBSTR(:P1_TEST,5,4);
    v_number:=SUBSTR(:P1_TEST,10);
    --check string length
    IF LENGTH(:P1_TEST)!=12 THEN
    RETURN 'String length must be 12 characters';
    END IF;
    --check if position 4 is empty
    IF INSTR(SUBSTR(:P1_TEST,4,1),' ')=0 THEN
    RETURN 'There should be a space between letters and numbers';
    END IF;
    --check if position 9 has "-"
    IF INSTR(SUBSTR(:P1_TEST,9,1),'-')=0 THEN
    RETURN 'There should be a dash between numbers';
    END IF;
    --check if positions 1-3 has letters
    FOR i IN 1 .. 3 LOOP
    SELECT ascii(substr(:P1_TEST, i, 1)) INTO v_number
    FROM Dual;
    IF v_number>=48 AND v_number<=59 THEN
    RETURN 'Only letters are allowed in positions 1,2,3';
    END IF;
    END LOOP;
    RETURN NULL;
    EXCEPTION
    WHEN OTHERS THEN
    v_error:=SQLERRM;
    IF INSTR(v_error, 'ORA-06502')>0 THEN
    RETURN '...must be integers only';
    ELSE
    RETURN v_error;
    END IF;
    END;
    I hope it will give you an idea on this type of validation.
    Val

  • I want to create decimal number formated text field

    hi
    I am trying to create decimal for eg 1234.20
    only this type number can acssess
    for that what I do

    try adding a CustomKeyListener to your text component....
    to create decimal for eg 1234.20((JTextComponent)component).addKeyListener(CustomKeyListener(4,2));
    import java.awt.event.*;
    import javax.swing.text.JTextComponent;
    public class CustomKeyListener extends KeyAdapter {
         char separator = '.';
         // total digits allowed
         int maximumSize ;
         // digits before the separator
         int before = -1;
         // digits after the separator
         int after = -1;
         public CustomKeyListener(int the_before,int the_after) {
              before = the_before;
              after = the_after;
              maximumSize = before+after+1;
         public void keyTyped(KeyEvent e){
              JTextComponent txtComp = (JTextComponent) e.getSource();
              if (txtComp.getText().length() < maximumSize ){
                   if(Character.isDigit(e.getKeyChar())||
                             e.getKeyCode() == KeyEvent.VK_BACK_SPACE||
                             e.getKeyChar() == separator ||
                             e.getKeyChar() == ',') {
                   // if txtComp contains a separator
                        if (txtComp.getText().indexOf(",") != -1 ||
                             txtComp.getText().indexOf(".") != -1     ){
                   // a second separator (if typed) will be deleted
                                  if (e.getKeyChar() == separator ||
                                                 e.getKeyChar() == ',')     {
                                  e.setKeyChar(new Character('\b'));
                                  return;
                   // typed a digit
                             int separatorPosition;     
                             if (txtComp.getText().indexOf(",") != -1 ){                         
                                  separatorPosition =txtComp.getText().indexOf(",");
                             else{                         
                                  separatorPosition =txtComp.getText().indexOf(".");
                             // finding caret position
                             int cp = txtComp.getCaretPosition();
    //                         System.out.println("posizione del caret " + cp);
                   // caret before separator
                             if ( cp <= separatorPosition ){
                                  if (txtComp.getText().
                                            substring(0,separatorPosition).trim().length()<
                                            before){     
                                       return;
                                  else{                              
                                       e.setKeyChar(new Character('\b'));
                                       return;          
                             else{
                             // caret after separator
                                  if (txtComp.getText().
                                            substring(separatorPosition+1).length()<
                                            after){     
                                       // digit is ok!
                                       return;
                                  else{
                                       e.setKeyChar(new Character('\b'));
                                       return;
                        else{
                        // separator absent
                             // if is typed a separator
                             if (e.getKeyChar() == separator ||
                             e.getKeyChar() == ','){
                                  int cp = txtComp.getCaretPosition();
                                  if (txtComp.getText().length() - cp-1 < after){
                                       return;
                                  else{
                                       e.setKeyChar(new Character('\b'));
                                       return;
                             // is typed a digit
                             else{                              
                                  if(txtComp.getText().trim().length()<before){
                                       return;
                                  else{
                                       e.setKeyChar(new Character('\b'));
                                       return;
                   }else{
                        // the key pressed isnt numeric
                        if (Character.getNumericValue(e.getKeyChar())!=-1)
                        e.setKeyChar(new Character('\b'));
                        return;
              else{
                   // Maximum lenght reached
                   e.setKeyChar(new Character('\b'));
    }

  • Professional 8 - Can't Get Rid of Tab Number In Text Field

    Hello,
      I hope someone can help me with this issue - when I create a text field on a PDF document and type text in the field, a "1" appears in the upper left hand corner (it's enclosed in a little black bordered box).  If it was only in the PDF file itself I could deal with it, but unfortunately it shows when I print the document too.  I've got some advice that it's the Tab function in Professional 8, but when I look for a way of turning it off or at least preventing it from showing up in the print, I can't find anything that works.  Adobe support has been no help, there still "looking into it".  I was hoping that perhaps someone has had a similar situation and could shed some light?.....
    Thanks!,

    Hello Bernd,
      I've attached an example of what's happening though I don't know if you'll be able to view the "1" in the upper left hand corner of the Text Field unless you have similar settings in Professional 8 (just a guessbecause Tech Support at Adobe couldn't see it so I sent a screen shot as well), so I've also attached a screen shot of the bottom of the document where the Text Field is showing the "1" in the corner.
    Things I've tried from suggestions made:
    1)  You have a tab order in your form turned ON. This is a standard feature of Adobe Acrobat. This is the only way Acrobat will display little numbers in the left-hand corner of the text field. However, tab order should not be visible during printing or entering data. These numbers are only displayed while editing form fields using "Form > Edit Fields in Acrobat...."  - (Which I didn't use to create the Text Field, I used "Tools", "Forms", "Text Field Tool")
    2)  "Print" dialog.  Select "Document" under "Comments and Forms" pull-down menu to avoid printing any markup or comments.
    I suspect that tab order might get printed for some reason you select anything else besides "Document".  - (I've tried everything is this menu)
    3)  1. Open your PDF form. 

  • Increment automatically a number in text field

    Hi all,
    I'm newbie on LiveCycle Designer 8. I created a form with different field. Everything is working fine but I would like to automatically increment a number contained in textfield. for example, the default value is: RMA0001,
    I would like, increase the last number each time that I click on special button. I visited the following topic, but sorry I don't understand: http://www.adobeforums.com/webx?128@@.59b4fc0d
    Could you help please?
    Let me know
    Regards,
    Alex

    You'll have to supply some more information for us to help you.  Among other things:
        - What version of SUP are you using?
        - What devices/emulators are you seeing this problem on?
        - Have you added any custom code?  If so, what is it?

  • How to popluate user defined values in Paramter field of a report using "Report Server Project", BIDS

    Hello,
    I am creating report using "Business Intelligence Development Studio", creating "Report Server Project" connected to TFS database.
    I have created Variance report and the output of report  as below sample:
    Project   Assigned To      Planned Effort        Completed    Remaining  Variance
    P1            X                        20                        
    10                 5              5
    P2            Y                        10                        
    10                 0             0
    P3            Z                          5                        
    0                  5              0
    By default I made Assigned To as parameter field and its showing data for selection in a drop down box (X, Y and Z) and data also filtered correctly.
    Q. how can I fill resource names in a drop down of my own choice (in this scenario, I want to display only X and Y) and display data based on the selected resource? By default parameter displays all the resources which I don't want.
    I did the below but could not get correct result:
    1. Right Click on "Assigned To" parameter, Clicked on "Available Values" and Selected "Specify values" instead of "Get values from query"
    2. Added X as Label and Value as 2 (Employee ID as mentioned in dbPerson table)
    Drop down displays X but when I clicked on report, it gives an error...
    Appreciate your help on this.
    Regards
    Abdul Kalam

    Hi Abdul,
    From the document, we know that CONSTRAINED flag is used to reduce the risk of injection attacks via the specified string. If a string is provided that is not directly resolvable to qualified
    or unqualified member names, the following error appears: "The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated."
    So you need to make sure the members are passed properly to the STRTOSET function. For more details, please see the following links:
    http://ch1n2.wordpress.com/2010/02/21/the-restrictions-imposed-by-the-constrained-flag-in-the-strtoset-function-were-violated/
    http://www.bp-msbi.com/2010/04/passing-unconstrained-set-and-member-parameters-between-reports-in-reporting-services/
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Using an array to define text fields

    I am developing a fairly simple program that will calculate the relationship of say a basketball player's height to his number of rebounds. It will display residual output, a graph, and many other things related to statistics. However, I have run into a problem.
    I want the user, at the very first screen, to use my combo box to define the number of pairs of data points he has in his relationship. So if he clicked on 10, the next screen would display 20 text fields, an X and a Y for each data point. My problem is I cannot create a user-defined amount of text fields in a for loop. If I use an array, string[count], to use as the name, it will not let me.
    Any suggestions or do I need to elaborate more?

    This would be the code for where I try to create the JTextFields.
    for(int count = 0; count<(2*getValue()); ++count)
    private JTextField values[count] = new JTextField(6);The array values[] simply contains values from 1-60. It will not allow me to use an array to name the JTextField.
    Also, I am not familiar with the List class. It sounds interesting, and it may be what I need.
    Sorry if that is not exactly the right code; I am not at my personal computer at the moment.
    Message was edited by:
    greenspacechunks

  • How to provide text formatting options to user from a text field

    Hi,
    My requirement is - in the interactive form, a comments field needs to be provided where user should be able to enter text with formatting options like
    Headers
    indentations
    bold/italic
    bullet points and numbers
    Once user enters the formatted texts in a text field, data needs to be displayed/printed in the same format. Could you help me on how to provide these formatting options to the user for a particular text field?
    I understand that once I define the text field with format XHTML (with RTF), user formatting can be captured and displayed in the same way. But I am not sure on how to provide the formatting options for the text field.
    Thank you,
    Madhu

    Hi,
    if you select a text field for Rich Text and the press Ctrl + E you'll get a bar for all available text formatting options in Acrobat/Reader.

  • User defined fields in task list

    What is the significance of adding user defined fields in task list operation?

    Dear Maniaba
    We have used user fields in task list to capture quantity in terms of nos & its weight for each operation. This we used as a work around to capture the repair jobs quantity & tonnage. While mapping repair of a particular machine with out any reference to material(that is we have not created them as serialised material as in the case of refurbishment) we have created task list for its repair and user wanted to capture the quantity of repair (say how many & also its weight) so we have maintained the tonnage per 1 no in these fields. later when order is being created user selects the task list & changes the quantity field then we have developed report where we calculate the total tonnage of that job & also no of items repaired.
    Regards
    S P Behera

  • DMS :Select Range for User defined fields in Classification Tab in CV04N

    Dear All,
    We have added User Define Fields Date field in Classification Tab in CV04N Transaction But it has single search (parameter) where we need to have Date range selection (Like Select Option) for the documents.
    I request you to suggest me some solution whether it is possible to achieve with any standard configuration as it is very critical to the Business .
    I would appreciate for your quick response and support.
    Thanks in Advance,
    Regards,
    Vishal.

    Dear Ravindra,
    Actually My requirement is when we enter the exact date in the input field its giving the documents submitted on that date.But when i give date range its not displaying the any documents where the document submited in between those two dates.
    Ex: I have submitted the document ( in CV01N ) for the approval on 10.05.2010(this is the same field in classification).
    In the CV04N transaction ,classification tab if I enter date as 10.05.2010 its giving the document submitted on that date.but if I enter the two dates 01.05.2010 and 20.05.2010 where document is been created B/W the input dates.
    Please suggest how to fulfill my business requirement ,I also request to check any configuration for the user defined fields can solve this problem instead of selecting single value when it can select the range of values.
    Thanks for your earlier reply.
    Regards,
    Vishal.

  • Text Field Problems

    Subject: Creating a form for user input.
    The text field allows the user to type in more information than the visible portion of the text field. I see where I can limit the number of characters however this is not a good option. Depending on the character or if it is capitalized the total length of the string will change where some text will be hidden or leave too much space before the end. How can the text field stop the user from adding more text when reaching the end?
    Another question:
    My form asks a question where the answer starts on the same line and then continues below. The text field below is much wider (width of the page) where I can't find the option of an odd shape text field to accommodate this. So far I will place a text field on the short line and add another text field on the line below. I can't find where the two text fields can be joined and the text cascade from one to the other.
    My impressioin:
    So far I am not very impressed with the from option as the text fields cannot be sized through the properties.
    You cannot change the text box that the form adds to a check box without deleting the text field and creating a check box. Additionally if you copy and paste a check box multiple times it creates a new check box that is connected to the original. You have to rename each check box otherwise if the user selects a check box all check boxes that was copied and paste will receive a check.
    Similarly if you copy a text field and paste into the form without renaming the field anything you type into the first text field will automatically be shown in all text fields that were paste into the form.
    The text box height does not resize when selecting a font size. You have to go out of edit and type into the text field to see if the  complete font will be shown or there is too much extra space.
    There has to be a better form making software available. Can anyone provide information towards other software that may be more suitable and eliminate the issues pointed out above?
    Thanks for your help

    To prevent the user from entering text beyond the size of the field - set the font's size to anything other than 'Auto', and uncheck the 'Scroll long text' and 'Multiline' checkboxes in the 'Options' tab. If you need multiline text, the text will always scroll. Setting the size to 'Auto' will reduce the text to fit the box (it will fit to one line if multiline is off, or to the entire box if multiline is on)
    Most of your complaints I don't agree with. Why should the field resize when you change the font size? That's up to you to decide the size/position/properties of the field. You do have the ability to select multiple fields and set them to the same height/width/both.
    And copy pasting a field shares the same value, that's a good thing. That allows you to show the same information in multiple areas easily. You need to change the field's name if you want to have a different value (shouldn't the field's name be different if the value it represents is different?).
    There is an alternative to Acrobat PDF forms, you can use Adobe Livecycle to create dynamic PDF forms. It is much more advanced (you can create dynamic fields which change size, can be added as line items, and much more). It's also a much larger learning curve.
    If you think using Acrobats form features a problem, try creating a form in Microsoft Word.

Maybe you are looking for

  • Double-clicking on Sender name to view full contact card

    Just upgraded to Outlook 2013 with Lync 2013, and so far I hate it.  In Outlook 2007, when I opened an email I could double-click on the sender's name and pull up its full contact card with all of the information that I had entered before, including

  • How many items can I install my itunes account on?

    I have itunes on my ipod touch, laptop and desktop that I currently have installed.  I also have an old desktop computer with a hard drive that went bad that I cannot access anymore that has my account of itunes installed on it as well. How can I get

  • Uneven White Edging Phenomenon When Exporting

    The past few sessions I've exported have caused my photos to display an uneven white boarder; this border begins in the top right of the photo and tapers to nothing at the top left. This phenomenon is repeated bottom left to top, right top to bottom,

  • Iphoto will not open as it is saying  it is no longer supported by the current environment

    I am trying to open Iphoto and there is an error mesage saying "you can't open the application iphoto because the Classic environment is no longer suppoerted"

  • Where are custom PDF page sizes stored?

    I built a new computer due to a failing hard drive and I want to copy over several custom page sizes that I created. It took a while to get these to mesh properly with Autocad and I don't want to have to make them all over again if possible. Are thes