How to display graphs based on user selection

Hi
    I need to acquire data for 8 channels or may be more than that, i know how to acquire data but when i display data on graphs
how can i make the code in such a way that if i select 4 channles i should get only four displays of graphs,if i select 8 then it should be able to display 8 graphs..

Hi abhisek,
current versions of LabVIEW show a "visible" button in the plot palette of a graph...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Dropdown display changes based on user selection in previous dropdown list

    Hi,
    I am really having trouble with this and spent a lot of time researching several blogs, tutorials, youtubes, etc. I just cannot get what I've found to work for me.  I am creating a simple form in LiveCycle Designer 8.0.  I have a table of 14 rows and four columns (row one is the header).  Each cell in the first 3 columns contain a dropdown filling the thirteen rows.  The last row is a user entered numerical field.  My query is related to the second column's drop downlist (months1) containing two items (24, 38) and the third column drop downlist (hours1) containing 5 items (4,000, 6,000, 8,000, 10,000, and 12,000).  In addition, there is a default item in each drop down set at <select>.
    I would like to have the instructions and script needed that will display the correct list of choices to the users in the "hours1" drop down list based on what was selected in the months1 dropdown.
    For example;
    if the user selects "24" in the months1 dropdown, then the hours1 dropdown should display "4,000, 6,000, and 8,000" only.
    if the user selects "36" in the months1 dropdown, then the hours1 dropdown should display "6,000, 8,000, 10,000 and 12,000" only.
    This type of coding would be great to replicate in other forms I have been tasked to do.  Thanks!

    This is helping me out. The only thing I am having trouble with is running the script from a function set up as a variable. I have a variable called "Members" set up with the following function:
    function TeamMembers()
              TimeSheetSF.EmployeeInfoSF.TeamMemDrop.rawValue = "";
              TimeSheetSF.EmployeeInfoSF.TeamMemDrop.clearItems();
              var myTeam = this.boundItem(xfa.event.newText);
              switch (myTeam)
                        case "Team 0":
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Cheryl");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Neil");
                                  break;
                        case "Team 1":
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Pat");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Carl");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Conn");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Gayle");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Gene");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("John");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Mich");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Malind");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Alan");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Maln");
                                  break;
                        case "Team 2":
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("David");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Cris");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Chad");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Linda");
                                  TimeSheetSF.EmployeeInfoSF.TeamsDrop.addItem("Steph");
                                  break;
    When I add the following to the change event of the first field and run it nothing happens. The drop down in the TeamsDrop drop-down field does nothing.
    Members.TeamMembers();
    If I add all of the code to the change event without it being wrapped in a function it works. I can't figure what I am doing wrong.
    I might add that I am creating the first drop down using a function in a variable and it works just fine.

  • How to HIde rows based on User Selection

    I have a requirement where in I have to hide some rows based on Plant Name selected by USer at the time of opening the report.
    Here is the screen  shot:-
    Here I am seeing two Tag Types MACT and Average when User selects  Luling Plant. But When User selects some other Plant I don't want to see Tag Type 'MACT' in this table.
    We have a predefine filter for Plant.
    How can I achieve that. The data in White Rows is Average values.
    Please help.
    Regards

    Hi Shalini,
    Is user selecting Plant Name from the report prompt. If Yes, then try below-
    Create a variable-
    FilterSelect= If UserResponce("WritePromptTextHere") =" Luling Plant" and TagType inList ("MACT";"Average") Then 1 ElseIf  UserResponce("WritePromptTextHere") <>" Luling Plant" and TagType inList ("MACT";"Average") Then 3 Else 2
    Apply Filter on "FilterSelect" variable-
    FilterSelect=1 and 2
    ~Anuj

  • How to display value based on LOV selection

    Hi,
    I have an editable table. On create operation one of the field is LOV, based on LOV selection the next field should be auto populated, please help me how to achive this.
    Thanks,

    Thanks for your reply........
    I did all these to get value based on LOV selection, but my problem is when i am trying to create a new record then everthing is working fine but normal search i am not getting the value of that attribute.
    below is my code
    Page:
    <af:column sortProperty="ProcessType" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    id="c36" width="340px;">
    <af:inputComboboxListOfValues id="processTypeId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    value="#{row.bindings.ProcessType.inputValue}"
    model="#{row.bindings.ProcessType.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.ProcessType.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.ProcessType.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.ProcessType.tooltip}" inlineStyle="width:800px;"
    valueChangeListener="#{backingBeanScope.backing_app_CalcSchedules.weeklyDescription}"
    autoSubmit="true" >
    <!-- <f:validator binding="#{row.bindings.ProcessType.validator}"/>-->
    </af:inputComboboxListOfValues>
    </af:column>
    <!--value="#{row.bindings.Description.inputValue}" backingBeanScope.backing_app_CalcSchedules.description-->//If i use this value in the below property line then i am not getting value while creating time but if i done blind search then i am not getting any value in this field.
    <af:column sortProperty="Description" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.Description.label}"
    id="c35" width="390px;">
    <af:inputComboboxListOfValues id="descriptionId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.Description.label}"
    value="#{row.bindings.Description.inputValue}"
    model="#{row.bindings.Description.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.Description.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.Description.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.Description.tooltip}" inlineStyle="width:1000px;"
    readOnly="true" partialTriggers="processTypeId">
    <f:validator binding="#{row.bindings.Description.validator}"/>
    </af:inputComboboxListOfValues>
    </af:column>

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • [MDX] Define date range based on user selection

    Hi All,
    I'm trying to define date range (of 3 months) using mdx based on user selection.
    This is what I'm trying to do:
    - If user select 2013, I would like range to be: from
    1 Oct 2013 to 31 Dec 2013
    - If user select Aug 2013, I would like range to be: from
    1 Jun 2013 to 31 Aug 2013
    - If user select 15 Sep 2013, I would like range to be : from
    15 Jul 2013 to 15 Sep 2013
    It is not a problem to get the upper bound of the range like this:
    ClosingPeriod(
    [Date].[Calendar].[Date],
    [Date].[Calendar].CurrentMember
    But I'm not able to get the lower bound of the range:
    OpeningPeriod(
    [Date].[Calendar].[Date],
    ParallelPeriod(
    [Date].[Calendar].[Month Number],
    2,
    ClosingPeriod(
    [Date].[Calendar].[Date],
    [Date].[Calendar].CurrentMember
    Error:If user selection is
    15 Aug 2013, I get
    14 Jun 2013
    If user selection is Apr 2013, I get
    (null)
    And even more strange, if user selection is
    2013, I get 28 Oct 2013
    Any idea of how to solve this ?
    Thanks,
    Guillaume

    Hello Guillaume,
    Can you please check if the following works for you? By the way, the performance will suffer due to all these IIF, the solution is very complex in order to avoid null in ParallelPeriod.
    with member measures.high as MemberToStr(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    member measures.low as
    MemberToStr(
    iif(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ) IS ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ).Parent.LastChild  --last date of the month
    OpeningPeriod(
       [Date].[Calendar].[Date],
    Ancestor(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ), [Date].[Calendar].[Month]).lag(2)
    iif([Date].[Calendar].CurrentMember.level is
    [Date].[Calendar].[Date]
    and
    Right(CSTR([Date].[Calendar].CurrentMember.Properties("KEY0")),4)="0429" --take care of 4/29
    OpeningPeriod(
       [Date].[Calendar].[Date],
    Ancestor(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ), [Date].[Calendar].[Month]).lag(2)
    OpeningPeriod(
       [Date].[Calendar].[Date],
       ParallelPeriod(
          [Date].[Calendar].[Month],
          2,
          ClosingPeriod(
             [Date].[Calendar].[Date],
             [Date].[Calendar].CurrentMember
    select  {measures.low,measures.high } on 0
    from [Adventure Works]
    where
    --[Date].[Calendar].[Date].&[20070815]
    --get [Date].[Calendar].[Date].&[20070615]
    --[Date].[Calendar].[Date].&[20070530]
    --get[Date].[Calendar].[Date].&[20070330]
    --[Date].[Calendar].[Date].&[20070429]
    --get [Date].[Calendar].[Date].&[20070201]
    --[Date].[Calendar].[Calendar Year].&[2007]
    --get [Date].[Calendar].[Date].&[20071001]
    --[Date].[Calendar].[Month].&[2007]&[4]
    --get [Date].[Calendar].[Date].&[20070201]
    --[Date].[Calendar].[Month].&[2007]&[5]
    --get [Date].[Calendar].[Date].&[20070301]
    --[Date].[Calendar].[Date].&[20070228]
    --get [Date].[Calendar].[Date].&[20061201]
    --[Date].[Calendar].[Date].&[20070831]
    --get [Date].[Calendar].[Date].&[20070601]
    If this does not work for you, I would suggest opening a ticket with Microsoft Support, with an advisory type of request.
    Hope this helps.
    Thanks.
    Meer Al - MSFT

  • Output different data based on user select

    Hi everyone,
    Quick question, I would like to output different report columns based on user select, eg., users would be presented with two choices in a radiobutton list, eg., 1 and 2.
    I have query results that contain columns A, B, C, D, E, F, G.
    If user selects 1 then the output should be columns A, B, C, D, E.
    If user selects 2 then the output should be columns A, B, C, F, G.
    I am sure this is possible and easy? If so, what topic should I be reading/searching internet on?
    Please advise.
    Thanks!

    I would say that this is most often something that your user interface should be dealing with (i.e. which columns should be shown).
    There is no way to do that in SQL.
    In PL/SQL it is a simple situation of creating two cursors and simply deciding which one to open.
    <pre>declare
    l_cur sys_refcursor;
    begin
    if :user_selection = 1 then
    open l_cur for select A, B, C, D, E from tbl;
    else
    open l_cur for select A, B, C, F, G from tbl;
    end if;
    -- use the cursor
    close l_cur; -- or return to user interface
    end;
    /</pre>
    Hope this helps.

  • How to hide/display chart based on User input parameter

    hi,
    I have a chart in WEBI report. This report prompts the end user with values {Yes, No}.
    If user selects value 'Yes', Chart should be displayed
    If user selects value 'No', Chart should be hidden.
    Please let me know how to achieve this....
    Thanks,
    Vamsee

    You can use a combination of steps. First, create a filter for the chart block based on your input prompt value. If the user says "No" then the chart should be empty due to the filter. Next, there is a checkbox that tells Web Intelligence whether to show an empty block or not. It is on by default, you can turn it off.
    I detail a solution with similar results on my blog where only one of two charts is displayed using a similar technique. It might help you understand more of the concepts.
    http://www.dagira.com/2007/07/31/alerters-on-charts-part-ii/

  • How to update records in a table based on user selection..

    Hi all,
    This time the above doubt is totally based on the logic of coding which I tried a lot but didn't get any solution. so atlast I come to sdn site.
    please help..
    The requirement is like that I have a table with 6 fields (1 primary key and other are nonkeys). If the user inputs some values in the fields on the screen, then a row will be added in the table. Upto this i have done well. but when the user want to change some value  in the existing row of the table my program unable to do so. Because I couldn't get any logic to do that as there are 5 nonkey fields, so if any one field is modified then the respective row should be selected first based on the user selection and then it should be updated.
    At this point I could not get any idea as it may take a lots of if conditions (I guess) to reach to that particular row.
    Please help..
    thanks ,
    sekhar

    Hi Sekhar,
    I am afraid, the whole design of your program is wrong, let me explain
    Let us say you have two rows(5 non key fields) that the user wants to update and the data in these five non key fields are identical and in your program you are getting a number(which is the key) using a number range object. So you will have two entries in the table for the same data.
    And on the update page when the user enters the non key fields, how will the program know(or for that matter any one of us) which record to pick, if you have two identical books and if asked for a book wouldn't you ask which one among these two do you want?
    Possible Solution: Identify a possible key maintaining the integrity of the data, that is a combination of the non key fields which will help you identify a unique row and make these fields as key fields in the table.
    A more costly solution(if you do not want to change the non key field keys to key fields) would be to, adding a check(using select statement) to see if the non key fields combination already exists in the Z table before inserting a record into the table.
    If yes, throw a message to the user and just update the values in the table, else insert the record.
    Another solution would be to, use the non key fields to generate a key(using some logic) and using this instead of the number range object.
    regards,
    Chen

  • Getting index of a string array based on user selection in a comboBox

    I'm not really sure how to phrase my questions, but here goes.
    I have created a string array that holds the values of a ComboBox. Based on which selection the user makes in the comboBox, I need the program to then perform particular calcualtions (based on their selection). I have tried using an ItemListener, but that doesn't seem to work. I've also tried using the ActionListener connected to the ComboBox, again...without results. I'm not sure what I'm looking for exactly, but I know what I want it to do, I'm just not finding the right way to do it. Can anyone help me figure this out?

    Here is my entire code. I'm completely confused at where to put the ActionListener or how to make it do what I want. Right now I just have it set up to display a simple message in the displayArea, just so that I could see if it was working. I think once I figure out how to get the right index from the ComboBox array, then I'll be able to add the code I need to perform the calcualtions...it's just getting to that step that's not going so well! Any help is appreciated.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.text.DecimalFormat;
    import java.lang.String;
    public class MortCalcSR5 extends JFrame implements ActionListener
         int term = 0;
         double principal = 0;
         double rate = 0;
         double monthlyPyment = 0;
         double interest = 0;
         String[] loanChoices = {" ", "7 years @ 5.35%", "15 years @ 5.5%", "30 years @ 5.75%"};
         //create panel for input
         JPanel inputPanel = new JPanel();
              JLabel mortAmtLabel = new JLabel("Mortgage Amount $");
              JTextField mortAmtField = new JTextField(15);
              JLabel loanSelectionLabel = new JLabel("Loan Selection");
              JComboBox loanSelection = new JComboBox(loanChoices);
              JTextField loanSelected = new JTextField(15);
         //create button panel
         JPanel buttonPanel = new JPanel();
              JButton calcButton = new JButton("Calculate");
              JButton clearButton = new JButton("Clear");
              JButton exitButton = new JButton("Exit");
         //create panel for payment information
         JPanel paymentPanel = new JPanel();
              JLabel paymentLabel = new JLabel("Monthly Payment $");
              JTextField paymentField = new JTextField(15);
         //create panel for text box information
         JPanel textPanel = new JPanel();
              JLabel numPaymentLabel = new JLabel("Payment #");
              JLabel balLabel = new JLabel("Balance");
              JLabel ytdPrincLabel = new JLabel("Principal");
              JLabel ytdIntLabel = new JLabel("Interest");
         //create payment for display area
         JPanel displayPanel = new JPanel(new FlowLayout());
              JTextArea displayArea = new JTextArea(10,30);
              JScrollPane scroll = new JScrollPane(displayArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
         public MortCalcSR5()
              //set size of GUI display
              setSize(400,450);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container pane = getContentPane();
              JScrollPane scroll = new JScrollPane (displayArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              FlowLayout layout = new FlowLayout(FlowLayout.LEFT);
              pane.setLayout(layout);
              //add components to the inputPanel
              GridLayout layout2 = new GridLayout(4,1);
              inputPanel.setLayout(layout2);
              inputPanel.add(mortAmtLabel);
              inputPanel.add(mortAmtField);
              mortAmtField.setText(" ");
              inputPanel.add(loanSelectionLabel);
              inputPanel.add(loanSelection);
              loanSelection.addActionListener(this);
              pane.add(inputPanel);
              //add components to buttonPanel
              FlowLayout layout3 = new FlowLayout(FlowLayout.CENTER, 10, 10);
              buttonPanel.setLayout(layout3);
              buttonPanel.add(calcButton);
              buttonPanel.add(clearButton);
              buttonPanel.add(exitButton);
              pane.add(buttonPanel);
              //add listeners to buttons
              calcButton.addActionListener(this);
              clearButton.addActionListener(this);
              exitButton.addActionListener(this);
              //add components to outputPanel
              FlowLayout layout4 = new FlowLayout(FlowLayout.LEFT, 10,10);
              paymentPanel.setLayout(layout4);
              paymentPanel.add(paymentLabel);
              paymentPanel.add(paymentField);
              pane.add(paymentPanel);
              //add components to textPanel
              FlowLayout layout5 = new FlowLayout(FlowLayout.LEFT, 10,10);
              textPanel.setLayout(layout5);
              textPanel.add(balLabel);
              textPanel.add(ytdPrincLabel);
              textPanel.add(ytdIntLabel);
              pane.add(textPanel);
              //add components to displayPanel
              FlowLayout layout6 = new FlowLayout(FlowLayout.CENTER,10,10);
              displayPanel.setLayout(layout6);
              displayPanel.add(scroll);
              pane.add(displayPanel);
              setContentPane(pane);
              setVisible(true);
         public void actionPerformed(ActionEvent event)
              String fs = (String)loanSelection.getSelectedItem();
              if (fs.equals("7 years @ 5.35%"))          {
                   displayArea.setText("yay");
              else
                   displayArea.setText("blah");
              JButton command = (JButton)event.getSource();
              if(command==calcButton)  //calculate button clicked - run payment event
                   Payment();
              if(command==clearButton) //clear button clicked - clear all fields
                   mortAmtField.setText(null);
                   paymentField.setText(null);
                   displayArea.setText(null);
                   loanSelected.setText(null);  //hidden text field still needs to be cleared
                   //loanChoices = null;
              if(command==exitButton)  //exit button clicked - exit program
                   System.exit(0);
         public void Payment()
              //perform the calculations
    //          int mortAmt = Integer.parseInt(mortAmtField.getText());
         //     double loanSelect = Double.parseDouble((String)loanSelected.getText());
              displayArea.append("Calcualations performed!");
         public static void main(String[] args)
              new MortCalcSR5();
    /*/calculations
         int mortAmt = Integer.parseInt(mortAmtField.getText());  //get text user entered in mortAmt field - parse it from a string to integer
         int loanTerm = Integer.parseInt(loanTermField.getText());  //get text user entered in loanTerm field - parse it from a string to integer
         double interestRate = Double.parseDouble(interestRateField.getText());  //get text user entered in interestRate field - parse it from a string to double
         int moTerm = (loanTerm*12);  //calculate monthly loan term
         double moInterest = ((interestRate/100)/12);  //calculate monthly interest rate
         double payment = mortAmt*(moInterest/(1-Math.pow(1/(1+moInterest), moTerm)));  //calculate monthly payment amount
         valid = true;  //number format is accepted
         paymentField.setText(Double.toString(payment));  //display output
    */

  • Creating report based on user selected Date Range

    Hello.
    I am trying to display an Apex report that selects data for the report based on a user entered date range.
    It's a simple page with two date picker fields (p18_start and p18_end).
    The report region SQL looks like this:
    SELECT *
    FROM prj_items
    WHERE LM_DT BETWEEN :p18_start AND :P18_end
    One table, one field on the table to search and two Apex variables.
    I thought this would be fairly simple, but I am obviously missing something.
    I not even sure what other information is needed to help me figure this out.
    -Jody

    Hi,
    You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
    When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
    Then your SQL would be:
    select * from PRJ_ITEMS
    where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
    AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
    SELECT * FROM PRJ_ITEMS
    WHERE (:P19_START IS NULL AND :P19_END IS NULL)
    OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
    OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
    OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
    Andy

  • Reading dynamic table column based on user selection

    Hi there,
    I am having a problem of reading and manipulating the data stored in a standard SAP table. The following example simulates the table and what i am trying to do:
    Table: Storing sales data for sales person
    SALES_PERSON    REGION   YEAR   MTH_S1  MTH_S2  MTH_S3 MTH_S4...
    Richard  S               NORTH    2007     100          200         300        400
    John K                    SOUTH    2007      50           100         100        20
    Brad P                    NORTH    2007     300          100         100        50
    User have have the following selection option:
    1. Month.
    The program will calculate the sales based on the individual month selected
    Example, if user select Month = 3, then program take only MTH_S3 column value
    So total sales = 300100100=500
    2. Month range
    The program will calculate the sales based on the month range selected
    Example, if user select Month 2 to 4, then program take MTH 2 to MTH_S4 columns value
    So total sales = 400 (for MTH_S2) + 500 (for MTH_S3) + 470 (for MTH_S4) = 1370
    How should i write the logic or code for this requirement?
    Hope someone can help.
    Thanks,
    Pang HK

    Try something like this
    TABLES:
    t247.
    SELECT-OPTIONS:
      s_month FOR t247-mnr NO-EXTENSION.
    DATA:
      BEGIN OF fs_data,
        person(30),
        area(10),
        year(4),
        mon1 TYPE kbetr,
        mon2 TYPE kbetr,
        mon3 TYPE kbetr,
        mon4 TYPE kbetr,
        mon5 TYPE kbetr,
      END OF fs_data,
      t_data LIKE STANDARD TABLE OF fs_data,
      w_no_months TYPE i,
      w_kbetr TYPE kbetr,
      w_total TYPE kbetr.
      LOOP AT t_data INTO fs_data.
        CLEAR w_kbetr.
        DO 5 TIMES VARYING w_kbetr FROM fs_data-mon1
                                                          NEXT fs_data-mon2.
        IF sy-index IN s_month.
          w_total = w_total + w_kbetr.
        ENDIF.
        ENDDO.
      ENDLOOP.
    change the value 5, according to the no.of months in ur internal table

  • Change portal language based on user selection in masthead7.3

    Hi All,
    I am trying to provide the language drop down option in Portal Masthead.
    I have created the Hovermenu in Masthead which displayes 2 options(English and German)
    When user selects German, the portal should be loaded in german language.
    Can you please guide me with the proper event handler which should be called, on clicking Hovermenu Item.
    Which URL should be called on clicking Hovermenu Item.
    I have checked some SDN links already.
    Regards,
    Sumangala

    Thanks for your answers.
    I have already checked those links.
    Now th problem what I am facing is,
    I am not able to call the function ChangeLanguage through javascript.
    I have created a dropdwon using Hovermenu and added English and German.
    Now when I click on these the function should be called.
    Please help me in getting how setClientSideScript() can be used to call a function.
    or any other way to call the function after clicking on Hovermenu Item.
    Thanks in advance,
    Sumangala

  • How To display Graphs in work book

    Hi Xpertz
    Could any one explain me how can i display graps in work books i mean i want the data disply in sheet one and graph display in the sheet two.say row in x axis and columns in Y axis..
    Ny suggestion..
    Thanx in Advance.
    With regards
    RMK
    **No need to say right answers will get full pointz**

    Hi,
    Slect the only Result area (including headers of rows and columns) and click 'chart Wizard' on excel tool bar..then foloow the steps to finish the graph..depending on selection in chart wizard,you can arrange data..Preview shows how your chart looks like...
    in the chartwizard,you have the option to display Graph in different sheet(you can select the sheet from dropdown box..),arranging rows and columns as required...etc
    regards
    Message was edited by: Murali

  • Dynamic dropdown based on user selection of another dropdown on the same page

    hi all, ok, I have a table which contains use data, a name,
    and a userID. for the example lets say "Simon Bullen" and my userID
    is "999".
    on a form I have, there is a dropdown box, which is dynamic
    from this table, and allows me to select Simon Bullen, however, I
    have a hidden field on the form, which when the user selects "simon
    bullen" the hidden field populates with the appropiate U number
    from the same table.... no i thought this would do it:
    <cfquery name="userNumber" datasource="userList">
    SELECT userNumber FROM dbo.Users WHERE Name =
    <cfqueryparam value="#form.Name#">
    </cfquery>
    and then my dynamic form field (hidden) would reference to
    this query....
    but it doens't work, could somebody please enlighten me? I'm
    hoping its something silly
    Thanks in advance

    You could make the value of the option the UserID and the
    option display the name.
    If that isn't what you need, I think you'll need some
    javascript to populate your hidden field based on what is chosen in
    the select.
    I think you can modify this:
    http://www.javascriptkit.com/javatutors/selectcontent2.shtml
    ...to populate your hidden field instead of a new select
    list.
    If there's a way to do that without JS I'm not aware of it.
    A third possibility: look up the UserID (based on the name
    chosen) after the form is submitted then do with it whatever you
    need to.

Maybe you are looking for

  • Sending MAIL on particular date in APEX 4.1

    Hello all, I want send mail automatically on the basis of a date column in my table. whenever that date is the current date of the system a mail should be sent to user? Please help me with this.

  • Recently the close tab function in safari has disappeared.

    Recently the close tab function in safari has disappeared and now I have to close tabs by right clicking, needless to say it's driving me mad. Is there a way I can sort this out?

  • Implementing Cash Flow (Indirect Method)

    Hi, Does anyone know what's required to implement Cash Flow (Indirect Method)? (T-code:S_ALR_87012272) Thanks, CW

  • MS Access table attachments to Sharepoint document library

    Hello Experts, I am using SharePoint 2013 and MS-Access 2010. my question is: If my user save a record in MS-Access 2010 with some attachments, how would I tell SharePoint or MS Access to save these attachments in specific SharePoint library with its

  • Regular Expression "Replace"

    (<PartName>([a-z]))(.*)(</PartName>) I need to change all copy within the <PartName></PartName> tags with Sentence Case. Above selects all the copy that doesn't have a capital. To write the above out in find and repalce, I would just use $1$2$3$4 but