Using command button to select query - WAD 7.0

Hello all
Can anyone please tell me how to configure a command button (button group) to display a particular query in WAD 7.0?
Here's what I mean -
I have a web template with three queries. I have inserted 3 command buttons on the template. I want to assign one button to one query, so that the users can select which of the three they want to view. Which Command do I select in the command wizard to do this? Also, is it possible to hide the other two queries, when one is selected?
Thanks
Karen

Hi,
Here is one approach - Keep three analysis items in the WT. Assign three different data providers to all three analysis items. If you do not want to show any query when the WT first loads, don't assign any query to the data providers. When a button is pushed, you can use the command SET_DATA_PROVIDER_PARAMATERS to assign a query to a DP so that that query will show up.
Other commands that will help you would be SET_ITEM_PARAMETERS using which you can hide analysis items and also, you can use the command BACK_TO_INITIAL_DP_STATE on data providers so that they do not show up if they were blank at the start.
Another way to hide a query is to assign the analysis item to a data provider which is blank.
For your requirements, you will have to put multiple commands behind each button - you can decide which of the above commands suit you best.

Similar Messages

  • CohQL command line Tool select query output in file (unix)

    Ho to insert Coherence CohQL command line Tool select query result in file in unix platform. I have tried below query but failed
    query.cmd -s -c -l "select * from 'dist-example'" >myOutput.txt
    I also tried below query, result is displayed in command line but no file is created in folder.
    select * from dist-example >myOutput.txt
    I also tried one more query, result is displayed in command line but no file is created in folder.
    select * from dist-example >/opt/bin/myOutput.txt

    Hi,
    In Unix you should use query.sh instead of query.cmd
    In your case then the command would be smething like:
    query.sh -s -c -l "select * from 'dist-example'" >myOutput.txt
    You can also try using '>>' instead of '>' in order to redirect to a text file.
    Hope this helps.
    -Cris

  • Check Index used in an oracle select query

    Hi Friends,
    I have partitioned an oracle table and created Local Index for the Partitioned table .
    Now i want to make sure that the Local index is being used when i perform select query on the Table partition.
    How do i confirm that ?
    can i check the explain plan generted for the select query to confirm local index is being used ?
    Please let me know.
    Regards,
    DB

    Now i want to make sure that the Local index is being used when i perform select query on the Table partition.Why? Have you proven that using this local index is the "best" plan?
    How do i confirm that ?
    can i check the explain plan generted for the select query to confirm local index is being used ?When I asked Google "how to read an oracle explain plan," I found lots of information - what did you find?

  • Using varchar record in SELECT query

    Hi, from a VARCHAR field I get the string ",1,2,3,4,5,6,".
    I wish to use it in a SELECT query like:
    SELECT * FROM TABLE WHERE ID IN (1,2,3,4,5,6)
    Is there a way to obtain this in a tsql query ?
    Thank you
    Stefano

    CREATE TABLE t1
     col1 INT NOT NULL PRIMARY KEY,
     col2 VARCHAR(50) NOT NULL
    INSERT INTO t1 VALUES (1,'10,11,12')
    INSERT INTO t1 VALUES (2,'13')
    INSERT INTO t1 VALUES (3,'14,15')
    CREATE TABLE t2
     col1 INT NOT NULL PRIMARY KEY,
     col2 VARCHAR(50) NOT NULL
    INSERT INTO t2 VALUES (10,'A')
    INSERT INTO t2 VALUES (11,'B')
    INSERT INTO t2 VALUES (12,'C')
    INSERT INTO t2 VALUES (13,'D')
    INSERT INTO t2 VALUES (14,'E')
    INSERT INTO t2 VALUES (15,'F')
    SELECT DISTINCT O.col1, O.col2
    FROM t1 T
       INNER JOIN t2 O
          ON (PATINDEX('%,' + CAST(O.col1 AS varchar(10)) + ',%',
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How can i use SUM aggregate in select query?

    HI,
    GURUS,
    How can i use SUM function in Select Query and i want to store that value into itab.
    for ex:
    TABLES: vbap.
    types: begin of ty_vbap,
           incluse type vbap,
           sum type string,
          end of ty_vbap.
    data: i_vbap type TABLE OF ty_vbap,
          w_vbap type ty_vbap.
    SELECT sum(posnr) FROM vbap into table i_vbap up to 5 rows.
                            (or)
    SELECT sum(posnr) FROM vbap into table i_vbap group by vbeln.
      loop at i_vbap into w_vbap
    " which variable have to use to display summed value.
      endloop.
    if above code is not understandable pleas give ome sample code on  above query.
    Thank u,
    shabeer ahmed.

    Hi,
    Check this sample code.
    TABLES SBOOK.
    DATA:  COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
    DATA:  CONNID LIKE SBOOK-CONNID.
    SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
           INTO (CONNID, COUNT, SUM, AVG)
           FROM SBOOK
           WHERE
             CARRID   = 'LH '      AND
             FLDATE   = '19950228'
           GROUP BY CONNID.
      WRITE: / CONNID, COUNT, SUM, AVG.
    ENDSELECT.
    Regards,
    Sravanthi

  • Command Button on selection screen application tool bar

    Hi All,
    I want to add command Button on selection screen application bar.
    it is my z progarm .
    please suggest one sample code .
    regards,
    Ajay reddy

    Goto SE41, create a Status and the call it in your app.
    SET PF-STATUS 'TEST'.
    Greetings,
    Blag.

  • I am attempting to upload multiple photos on a macpro from a cd.  I am used to a pc.  I tried using the command button to select multiples but it does not work.  Please advise

    I am attempting to upload multiple photos on a mac pro from a cd.  I have tried holding the "command"button down to select multiple photos but it does not work.  Please advise.  Thanks,John

    why not sort by (name, date, etc) and Click on 1st and Shift-Click on last.
    Might work better to copy or import to a project folder.
    https://discussions.apple.com/community/ilife/iphoto
    http://www.apple.com/support/iphoto

  • Command buttons to Assign Query / Query view with variables on Workbooks

    Hi experts,
    We want to have a workbook with buttons that will change the Query/Query view displayed in the unique grid we have.
    We've included command buttons on a workbook, as "<b>Data Provider Specific Command</b>" and chose the Queries, selecting the "<b>Assign Query / Query View</b>" option.
    When using queries without variables or just SAP exit variables it works perfectly, clicking the buttons change the table displayed accordingly. But when using queries that have at least one variable, in our test to select time interval, it doesn't work anymore.
    In our test, we're using just 2 queries and they have the same input variable (to select months interval); but when clicking the button no change/error occurs.
    Any ideas?
    Thanks in advance.

    Hi,
    Here is one approach - Keep three analysis items in the WT. Assign three different data providers to all three analysis items. If you do not want to show any query when the WT first loads, don't assign any query to the data providers. When a button is pushed, you can use the command SET_DATA_PROVIDER_PARAMATERS to assign a query to a DP so that that query will show up.
    Other commands that will help you would be SET_ITEM_PARAMETERS using which you can hide analysis items and also, you can use the command BACK_TO_INITIAL_DP_STATE on data providers so that they do not show up if they were blank at the start.
    Another way to hide a query is to assign the analysis item to a data provider which is blank.
    For your requirements, you will have to put multiple commands behind each button - you can decide which of the above commands suit you best.

  • Embedding a picture and using command buttons

    I developing CVI test software to production test keypads.  I would like to take a picture of the actual keypad and superimpose command buttons for keys and a textbox for the keypad display.  This will make an interactive display for the operator.  Can this be done?  When I move the buttons on top of the picture they are visible but do not operate.  Any suggestions?

    Are you sure the button are on top of the picture? Can you see them? If they were on top they should be operable.
    To set the picture below the command buttons you must select it and press F7 key: with this the picture is moved to the background and the buttons should be operable -and visible.
    The problem at this moment will be to "hide" the buttons so that they have no visual effect but they remain operable. You can achieve this by painting them with transparent colour (note: this will not be possible if you have set Use Windows Visual Style for Controls attribute in panel advanced attributes: try disabling this option to test the operation).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Sample XML format that can be used to write a SELECT query

    Hello,
    I want to use and XML file in the scenario FILE to JDBC where i use the operation as SELECT in which i want to embbed an sql statemnet which is equivalent to
    SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO>1
    as in the form of XML format like,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
    <STATEMENT>
    <TABLENAME ACTION="SELECT">
    <TABLE>EMPTEST</TABLE>
    <ACCESS>
    <EMPNO></EMPNO>
    <NAME></NAME>
    </ACCESS>
    <KEY>
    <EMPNO compareOperation="GT">1</EMPNO>
    </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_JDBC_SELECT_JDBC_REQ>
    Can i do like this?
    PLease help me out in using various conditions in the XML file formats like the above.
    Thanks,
    Soorya.

    Hello raj,
    I would like to write the query in that format where i mentioned as,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
    <STATEMENT>
    <TABLENAME ACTION="SELECT">
    <TABLE>EMPTEST</TABLE>
    <ACCESS>
    <EMPNO></EMPNO>
    <NAME></NAME>
    </ACCESS>
    <KEY>
    <EMPNO compareOperation="GT">1</EMPNO>
    </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_JDBC_SELECT_JDBC_REQ>
    without giving clear SQL statement as you mentioned here like,
    <ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
    <STATEMENT>
    <TABLENAME ACTION="SQL_QUERY">
    <ACCESS>SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO > '$EMPNO$’</ACCESS>
    <KEY>
    <EMPNO>1</EMPNO>
    </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_JDBC_SELECT_JDBC_REQ>
    Thanks,
    Soorya

  • Using command click to select file in lion causes them to open--why?

    Lately a lot of routine things have become (for lack of a better word) sensitive in Lion. 
    I send an email and in about one in three it sends a duplicate. 
    If I am trying to place edited text in an email or word document I cannot get the cursor placed-- instead the whole word or group of words is selected. 
    If I try to select text using my cursor (by) it sometimes works and sometimes does not. 
    If I hold down the command key to select different documants sometimes it opens them and does not select them.  I can also have a document open (sometimes) when I just select it-- click on it twice. 
    I tried adjusting mouse preferences but no luck. 
    It is driving me nuts-- anyone got any ideas?

    Thanks for the input-- but at this point I do not think so.  The mouse is only a few months old and I am beginning to suspect it may have been one of two things.  The first would not explain the problems I had with Word or the opening (when just selecting on the desktop), and that is the I rebuilt the mail boxes in Mail.
    The second is that I stopped having the machine open everything when I restarted and restarted bare bones.  I am now only using apps that I need at the moment and the environment seems to be a lot better.  Thus I am wondering if I had a conflict with something else.  I plan to keep sleuthing and will let you know if I come up with anything.

  • Using buffering option in select query

    Hi All,
           Can anybody give me a brief idea on , where we will use the buffering and how we will write it in coding part.Similarly please tell me what will happen if we use  by passing buffering  addition in select query. Please explain  it with steps of sample code if possible.
    Thanks in advance.
    Regards,
    Rakesh.

    Hi Sharma,
    Buffer is used to hold large amount of data.
    if internla table is unable to hold data.. Buffer is used..this is mainly used in copy data from PRD to Quality as a part testung.
    see the sample code how the buffer is used..
    FUNCTION zzrfc_get_zcpeg_fg_related.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(PL_VERSION) LIKE  ZCPEG_FG_RELATED-PL_VERSION OPTIONAL
    *"     VALUE(BYPASS_BUFFER) LIKE  SY-FTYPE DEFAULT SPACE
    *"     VALUE(FROM_KEY) LIKE  SY-ENTRY DEFAULT SPACE
    *"     VALUE(GEN_KEY) LIKE  SY-ENTRY DEFAULT SPACE
    *"     VALUE(MAX_ENTRIES) LIKE  SY-TABIX DEFAULT 0
    *"     VALUE(TABLE_NAME) LIKE  X030L-TABNAME
    *"     VALUE(TO_KEY) LIKE  SY-ENTRY DEFAULT SPACE
    *"  EXPORTING
    *"     VALUE(NUMBER_OF_ENTRIES) LIKE  SY-INDEX
    *"  TABLES
    *"      ENTRIES STRUCTURE  ZCPEG_FG_RELATED
    *"  EXCEPTIONS
    *"      INTERNAL_ERROR
    *"      TABLE_EMPTY
    *"      TABLE_NOT_FOUND
      TABLES dd02l.
      DATA: BEGIN OF buf OCCURS 100,
                line(4100),
            END OF buf.
      DATA keyln TYPE i.
      DATA: l_tabname LIKE dd25v-viewname.
      DATA: l_len     TYPE i.
      DATA : w_plversion TYPE /sapapo/vrsioex.   "PJONNALA
      w_plversion =  pl_version.                 "PJONNALA
      l_tabname = table_name.
      CALL FUNCTION 'VIEW_AUTHORITY_CHECK'
        EXPORTING
          view_action                = 'S'
          view_name                  = l_tabname
          no_warning_for_clientindep = 'X'
        EXCEPTIONS
          OTHERS                     = 6.
      IF sy-subrc <> 0.
        RAISE internal_error.
      ENDIF.
      IF bypass_buffer NE ' ' AND bypass_buffer NE 'N'.
        bypass_buffer = 'Y'.
      ENDIF.
      IF gen_key CA ' '. ENDIF.
      keyln = sy-fdpos.
    * read client dependant tables always with client
      SELECT SINGLE * FROM dd02l WHERE tabname = table_name
                                  AND as4local =  'A'.
      IF dd02l-clidep = 'X'.
    *l_len = strlen( sy-mandt ) * cl_abap_char_utilities=>charsize.
    *  " ecwg. unicode
    *    move gen_key to gen_key+l_len.
    *    move sy-mandt to gen_key(l_len).
    *    add l_len to keyln.
        CONCATENATE sy-mandt gen_key INTO gen_key.
        keyln = STRLEN( gen_key ) * cl_abap_char_utilities=>charsize.
      ENDIF.
    *  endselect.
      IF keyln NE 0 OR from_key = space.
        CALL 'C_GET_TABLE' ID 'TABLNAME'  FIELD table_name
                           ID 'INTTAB'    FIELD buf-*sys*
                           ID 'GENKEY'    FIELD gen_key
                           ID 'GENKEY_LN' FIELD keyln
                           ID 'DBCNT'     FIELD number_of_entries
                           ID 'BYPASS'    FIELD bypass_buffer.
      ELSE.
        CALL 'C_GET_TABLE' ID 'TABLNAME'  FIELD table_name
                           ID 'INTTAB'    FIELD buf-*sys*
                           ID 'FROM_KEY'  FIELD from_key
                           ID 'TO_KEY'    FIELD to_key
                           ID 'DBCNT'     FIELD number_of_entries
                           ID 'BYPASS'    FIELD bypass_buffer.
      ENDIF.
      CASE sy-subrc.
        WHEN 4.  RAISE table_empty.
        WHEN 8.  RAISE table_not_found.
        WHEN 12. RAISE internal_error.
      ENDCASE.
      DESCRIBE TABLE buf LINES number_of_entries.
    ENDFUNCTION.
    Regards,
    Prabhudas

  • How can i use param in my select query ( see code)

    Hi ,
    I need to use the param instead of hardcoding the value in the select query , when i did that it is working .
    I think the limit of args is only till the end of main and my select query is in a method called Load() .
    How can i use the param in my select query .
    public static void main(String[] args){
    name = args[0];
    class= args[1];
    new Load();
    }//end of main
    public Load()
              try {
                   Class.forName(JDBC_DRIVER);
                   connection = DriverManager.getConnection(DATABASE_URL,"username","pw");
                   statement = connection.createStatement();
                   //First Query : pin and ticket number
                   ResultSet resultSet = statement.executeQuery("SELECT pin , ticketnumber from airport ,year where "+                                                                      "year.year_name= Here i need to use the param (instead of hardcoding) and year.class_year= Here too i need to use param");
    }// end of method Load()Edited by: 1sai on Sep 24, 2008 7:34 AM
    Edited by: 1sai on Sep 24, 2008 7:35 AM

    Might I suggest you change the structure of your program to the following:
    public class Load {
      private Connection conn;
      private PreparedStatement statement;
      public Load(String sql) {
        init(sql);
      protected void init(String sql) throws Exception {
        Class.forName(JDBC_DRIVER);
        conn = DriverManager.getConnection(DATABASE_URL, "username", "pw");
        statement = conn.prepareStatement(sql);
      public ResultSet execute(String p1, String p2) throws Exception {
        statement.setString(1, p1);
        statement.setString(2, p2);
        return statement.executeQuery();
      public void close() throws Exception {
        if (statement != null)
          statement.close();
        statement = null;
        if (conn != null)
          conn.close();
        conn = null;
      public static void main(String[] args) throws Exception {
        String sql = args[0];
        String param1 = args[1];
        String param2 = args[2];
        Load load = new Load(sql);
        ResultSet rs = load.execute(param1, param2);
        while (rs.next())
          System.out.println(rs.get(0));
        rs.close();
        load.close();
    }This allows you to use the same "Load" object for multiple queries with different parameters.
    I do not recommend you actually use the code above in any sort of production application. You should really take a look at Spring Framework along with an ORM tool like Hibernate or Ibatis to simplify your DAO layer.
    Hope this helps,
    David

  • HELP using command button in J2ME

    Hi
    I am trying to create a simple code using the command button, but when i try 2 run my program, it gives the following error:
    java.lang.ClassCastException
         at test1.startApp(+81)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+266)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    Could anyone tell me where the problem could be? Im attaching my code below.
    Thanks in advance
    Regards
    Shikha
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.lcdui.*;
    import java.util.*;
    public class test1 extends MIDlet {
         Random generator;
         Form basicForm;
         Command appendCommand;
         public test1() {
              super();
              System.out.println("Constructor: test1()");
              // TODO Auto-generated constructor stub
         protected void startApp() throws MIDletStateChangeException {
              System.out.println("StartApp()");
              //create and seed a new Random generator with the current time.
              generator = new Random( System.currentTimeMillis() );
              //get the display for this MIDlet
              Display display = Display.getDisplay( this );
              //create a new Form with the title "Form Title"
              basicForm = new Form("Form Title");
              //append the string "My basic Form" to the new Form
              basicForm.append("My basic Form");
              //Create a new Command to catch user input
              appendCommand = new Command("Random", Command.SCREEN, 1);
              //adds the appendCommand to the basicForm
              basicForm.addCommand( appendCommand );
              try{
              //set the Forms CommandListener to this instance. so all Command
              //events are passed to us.
              basicForm.setCommandListener((CommandListener)this);
              }catch(Exception e){
                   System.out.println("Exception is->"+e.toString());
                   e.printStackTrace();
              // set the current Displayable to the new Form
              display.setCurrent( basicForm );
         public void commandAction( Command c, Displayable d )
              //check if the commandAction event is triggerd by our appendCommand
              if( c == appendCommand )
                   //append a String to the form with a random number between 0 and 50.
                   basicForm.append("Random: " + ( Math.abs( generator.nextInt() ) %50 ) + "\n");
         protected void pauseApp() {
              // TODO Auto-generated method stub
         protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
              // TODO Auto-generated method stub
              System.out.println("destroyApp()");
    }

    basicForm.setCommandListener((CommandListener)this);You're trying to cast your MIDlet subclass (aka, "this") to a CommandListener, but you haven't specified that it implements that interface. So you need to declare the class as follows:
    public class test1 extends MIDlet  implements CommandListener {shmoove

  • Help! Can't use scroll button (to select) when online

    Hi!  If anyone could help me, I would be eternally grateful.
    Just recently, when I go online on my BlackBerry Curve (not sure of the #, but I have a scroll button and not a trackball), I can't push the scroll button to select things.  For example, I couldn't get help for the problem on my phone, because when I typed in my question, I couldn't hit the serach button to ask it! 
    Most links I am able to select by clicking the menu button and selecting "open link", but that doesn't work on submitting information like username/password on blogger or my bank or anything.
    Please help!
    Thank you!
    Larissa

    Hello lchardesty and welcome to the BlackBerry Support Community Forums.
    I would suggest you do what is called a clean software reload. 
    Back up your BlackBerry before you start as all the data will be deleted.
     KB11320 will show you how to do the software reload.
    After the load completes, test the track pad.
    It is suggested to do a selective restore of your data so the issue doesn't re-occur
    KB10339 will show you how to do a selective restore of your data using Desktop Manager 5.0.1 and earlier and KB23680 using version 6.0
    Let me know how you make out.
    -HMthePirate
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

Maybe you are looking for