Passing parameter to record group to populate a list of value

i have a record group that populate a list of values
rg_id := Create_Group_From_Query( rg_name,
'SELECT USER_ID USER_ID,'
|| 'TO_CHAR(USER_ID) USER_ID2 '
||'FROM USER_LIST '
||'ORDER BY 2');
but haw i can pass a parameter (the value of a field) in the query that have the ' ' ??
i try this
rg_id := Create_Group_From_Query( rg_name,
'SELECT USER_ID USER_ID,'
|| 'TO_CHAR(USER_ID) USER_ID2 '
||'FROM USER_LIST WHERE USER_A = ' || :B0.FILED1 ||
||'ORDER BY 2');
BUT SEEM NOT WORKING !!!
ANY IDEA ??

ok , thank's work very well, but i have a little problem :
the first time that i choose a value from the first list the second become populate very well, but the second time and over, the second list don't change and remeber the first choise.
rg_id := Find_Group( rg_name );
     VAR_SQL := 'SELECT USER_ID USER_ID, TO_CHAR(USER_ID) USER_ID2 FROM USER_LIST WHERE USER_AGENZIA = ''' || :B0.USER_AGENZIA || ''' ORDER BY 2';
IF Id_Null(rg_id) THEN
rg_id := Create_Group_From_Query( rg_name, VAR_SQL);
END IF;
errcode := Populate_Group( rg_id );
Populate_List('B0.USER_ID', RG_ID);
may be the populate_group ??

Similar Messages

  • Unseen user parameter data when it is based on list of values

    Hi All;
    i use oracle report builder version 6.0.8.8.3 on win98 platform and i have a silly problem.
    When i create a user parameter with list of values , the list does not display any data .
    When i select any empty row from the list the report runs correctly displaying the data filtered where the selected emty row indicating that the list contains data but it does not appear in the list.
    I feel that it is a bug in my version.
    thank you in advance.

    i discovered a new notice about this problem,
    when the data displayed is arabic ,it does not appear.
    when it is english ,it appears clearly.
    my nls_lang=american_america.ar8mswin1256 and i tried another nls_lang=american_america.ar8msawin and it does not work also.
    i tried to un check the hide first column property but both arabic & english data do not appear
    thank u for your concern

  • Hierarchical Tree not showing using a record group to populate

    Hi, I am trying to set up an hierarchical tree. Can someone please give me the exact steps I need to take to get this right.
    I am trying to create a hierarchical tree to behave like a menu on a Main form from where I will call the other forms of my application.
    I have done the following
    select 1, level, null, form_name, form_name
    from iso_forms
    connect by prior form_name=action
    start with action is null
    and get this when I run the statement in pl/sql
    1 LEVEL NULL FORM_NAME FORM_NAME
    1 1 Edit Edit
    1 2 Holder Holder
    1 2 Isotopes Isotopes
    1 2 Laboratories Laboratories
    1 2 Personal Personal
    1 2 Incident Incident
    1 2 Equipment Equipment
    1 2 Over Exposure Over Exposure
    1 2 Archive Archive
    1 1 Print Print
    1 1 Queries Queries
    My tree on my main form is still blank, I have checked that the tree is the only item in the block but I am not sure how to confirm that it is a control block. I created the tree in layout editor by clicking on the Hierarchical Tree icon on the left and then dragging out a block, so I am assuming that the block is of the correct type.
    Thank you for your assistance
    Michael

    a control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
    I suggest you create a procedure where you create the record_group using
    CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
    Here is my code that I i used to populate my tree .it works:
    PROCEDURE populate_the_tree IS
    grp recordgroup;
    error_number number;
    grpname varchar2(20) :='rg_group';
    tree_id item :=find_item('ctrl.tree');
    grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
    begin
         grp := find_group(grpname);
         if not id_null(grp)
              then delete_group(grp);
         end if;
    --     grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
         grp := create_group_from_query(grpname,grp_qry2);
         error_number:=populate_group(grpname);
         if error_number <> 0
              then message('Error while populating tree');
              raise form_trigger_failure;
         end if;
         ftree.set_tree_property(tree_id,ftree.record_group,grp);
    END;
    Message was edited by:
    lewismak2000

  • How-To populate SELECT LIST default value from SQL Query

    OK, I've done my homework, and did not find my answer in the Forum, so here it is.
    I have a Page that displays fields from a SQL Query. The Page also has below that radiogroups, checkboxes, and Select Lists to allow the user to change values in the fields that are displayed at the top of the Region. I am able to pre-populate the radiogroups and checkboxes by performing a SELECT in the 'Source value or expression' of the Source area of the Page Item.
    However, I am unable to do the same for the Select List fields. Their default value ends up being the first value in the LOV ('-- None --' for NULL values). Source Used: Only when current value in session state is null. Source Type: SQL Query. Also, when I first go into the Page when running it, and check the Session State values, they are all null, so I don't understand why the field is not populated by the SQL Query statement as the radiogroups and checkboxes are.
    Any suggestions??? I've tried all sorts of combinations.

    Thank you for the suggestion.
    I had considered that, but cannot do so, because we are using Oracle Application Express more for development than for data containment.
    We have all our data in an Oracle 10.g DB which is separate from the OAEX server, and the OAEX app will reference that data via VIEWs and DB LINKs. We are doing so primarily as an added data security layer, where the data is housed separate from the app, in case the Web site is ever compromised. The data that can be viewed is restricted to a subset of the actual data that is available.
    Since the data is on a separate server, (I assume) we will not be able to set the source type to Database column, because (I asume) that is dependent upon the data being housed by the OAEX server.
    That still leaves me with having to populate the field with a SELECT statement from the Oracle DB. This unfortuneately is almost a show-stopper for me because of down-stream processing data requirements. Have not been able to come up with contingencies yet.

  • Dynamic record group

    Please explain me step by step to create dynamic record group and populate it into my combo box.
    thanks
    rupal
    Edited by: rupearlkaushal on Jun 13, 2012 9:39 PM

    hi
    plz check out the following threads.
    Dynamic creation of record group
    and
    Dynamic Record Group
    LOV (List of Values)
    LOV is nothing but a form item which is used to provide list of values to a text field.
    Each LOV contains a Record Group which provides the data to the LOV
    Record Group
    A record groups contains the query which is used to populate the values to the LOV.
    To alter a list of values(LOV) of a text field, we should change the query of the
    record group which is attached to the corresponding LOV or we should create a
    new record group and attach it to the existing LOV.
    Note : We cant create a new LOV. But we can attach a exsiting LOV to a form field.Method 1: Changing the query of the existing Record group
    declare
    rg_id RECORDGROUP ;
    err number;
    lv_id lov;
    begin
    rg_id:=find_group('LOV4'); -- LOV4 is the name of the existing LOV
    if not id_null(rg_id) then
    err:=populate_group_with_query(rg_id,
             'select deptno from dept where dname=''SALES''');
    end if;
    lv_id:=find_lov('LOV4');
    set_lov_property(lv_id,group_name,rg_id);Method 2: Creating a new Record Group if doesn't exists
    declare
    rg_id recordgroup;
    pg_num number;
    lv_id lov;
    begin
    rg_id:=find_group('MYGROUP');  -- MYGROUP is the Group Name
    if id_null(rg_id) then
    rg_id:=create_group_from_query('MYGROUP','SELECT 100 deptno FROM dual');
    end if;
    pg_num:=populate_group(rg_id);
    lv_id:=find_lov('LOV4');sarah
    Edited by: Sarah on Jun 13, 2012 9:56 PM

  • Record group

    I'd like to create a hierarchy tree that display department name as the first level and all employees who works in that department as second level .Can anyone help me with the correct query ?
    Any help would be thankful.

    Create a query based record group to populate tree.
    An example:
    select
    initial_state,
    depth,
    label,
    icon,
    data
    from
    select *
    from
    select
    -1 initial_state,
    1 depth,
    dept.deptno dcode,
    dept.dname label,
    'Dept' type,
    dept.deptno data,
    'your_dept_icon or NULL' icon
    from dept
    union
    select
    -1 initial_state,
    2 depth,
    emp.deptno dcode,
    emp.ename label,
    'Emp' type,
    emp.empno data,
    'your_emp_icon or NULL' icon
    from emp
    ) order by dcode, type, label
    GB

  • Help with poplist record group query

    Hi, I want to populate a poplist based on the following query:
    SELECT value
    FROM table.value
    WHERE code_parent IS NULL
    UNION ALL
    SELECT 'ALL'
    FROM dual
    ORDER
    BY code
    Now I know that you need 2 columns in the record group to populate a poplist, but I cannot seem to modify the query to have 2 columns. I am basically adding the 'ALL' value, which will have a label of 'ALL' and a value of 'ALL'.
    The first select I can easily modify to be an acceptable record group for a dynamic poplist, Its the union that im having problems with. The following select does not work. Help would be appreciated.
    SELECT table.value, table.value
    FROM table.value
    WHERE code_parent IS NULL
    UNION ALL
    SELECT 'ALL', 'ALL'
    FROM dual
    ORDER
    BY table.value

    Based on the error I'd guess that one of your columns are defined as a number and the union columns are both varchar2. Match the datatype with the column it corresponds to:
    UNION
    SELECT 'ALL', 0
    FROM DUAL
    ORDER BY 1
    The order by clause also needs to reference the column number instead of the column name since the union clause does not have a column name.

  • Passing parameter to next dropdown

    My question is..is it possible to passing parameter to second drop down .if i select one value(ex : INDIA) first dropdown that value shd go to second drop down qry then matching records only shd display in second drop down.
    i ll write query for second drop down
    select state from state where country =  -
    >(INDIA)
    issues:-
    if i refresh the report first showing one text box then i entered the country values after that shwing country drop down and
    state dropdown according that values.. i need to show only two dropdown box and through passing parameter..

    Sounds like performance issue (number of records) causes the usual cascading parameter to be too slow for you.  Check you didn't forget to join the tables used by the dynamic parameters. 
    If that was not the issue, you can create your own viewer application and take care of the parameters using your own GUI.
    Alternatively, one of the 3rd-party viewers (see list at http://www.kenhamady.com/bookmarks.html) provides special dynamic and cascading parameters that would solve this issue for you.  Each parameter can use another crystal report to provide the list of values, and each of these reports can have it's own static or dynamic parameter (providing the cascading effect).

  • About record group  useing .

    when record group is datasource of list,lov,tree,
    which is the columns's datatype ?
    what's means the first column and the second column ..........

    Hi,
    it depends on how you use it. In a poplist it could mean the difference between the displayed data and the passed data value. In a LOV you may want to have even more data shown. Run the LOV wizard which will give you an idea of how group columns are used.
    Frank

  • What is the maximum number of records in a dynamic parameter list of values?

    In Crystal Reports Developer, I am attempting to add a dynamic parameter from a view.  The view has 6773 total records.  The field used for the parameter has 1819 distinct values, none of which are null.
    I have the parameter set to allow multiple values, and I have added
    field is equal to parameter
    in the select expert.
    However, when I refresh the report and tell it to prompt for new parameters, the list of values does not contain all the values, so about half of the records are dropped.
    Is there a way I can guarantee that all 1819 (or an unlimited number) records show up in the List of Values?

    This has been answered. Search forums for the results

  • What are record groups for?

    hi,
    Could anybody tell me what is the main purpose of creating record groups whith statements like: create_group_from_query, populate_group, ...
    Every time we want to access any records we can use blocks which are based on tables or views which are in Oracle Data Base. So what is the reason of creating record groups?
    please explain my that issue:)
    Grzegorz

    hi grzegorz,
    Record Group is one which is used with LOVs and List Items.
    for the use of LOV & List items u must have to define record group through whis the List items or LOV is belogs to that group.
    A record group built from a query can store records from database tables much like a database view, with the added advantage that the record group is local to Form Builder, rather than existing in the database.
    To know more about record group, form builder's help is good way,
    Regards
    Chandan

  • How to pass parameter in query string

    Hi Friends,
    I have a working struts app with Action classes and Servlets...now I need to pass query paramter to one of the servlets,can someone please tell me how to do that.I tried to put this code in web.xml but failed:
    <servlet>
    <servlet-name> test</servlet-name>
    <servlet-class>com.app.Test </servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>test</servlet-name>
        <url-pattern>/app/Test</url-pattern>
      </servlet-mapping>And then I tried to pass parameter as:
    http://localhost:8080/app/Test?param=value
    Please tell me guys how to accomplish this.
    Thanks in advance

    What do you mean by fails? Can you access the Servlet without the parameter? Do you get a null value when trying to retrieve the parameter?

  • Record Group Query - item block

    I need to calculate a Record Group Query using a block item value, but when a use the query below the query didn't return rows:
    SELECT OID_SIIB_FINALIDADE_TED
         , F.COD_FINALIDADE || ' - ' || F.DES_FINALIDADE DES_FINALIDADE
      FROM SIIB_FINALIDADE_TED F
          , ( SELECT P.TP_PARAMETRO
                FROM SIIB_PARAMETROS_GERAIS P  
              WHERE P.NM_PARAMETRO = 'TIPO_' || :BLOCK.ITEMX ) PAR -- using the :BLOCK.ITEMX the query did'nt return data
    WHERE PAR.TP_PARAMETRO = F.TPO_FINALIDADEBut if a use a static query the Record Group( changing :BLOCK.ITEMX for 'STR0005' ) return the desired values.
    This Record Group is used to pupulate a LOV.
    Edited by: user5914526 on Feb 15, 2012 9:26 AM
    Edited by: user5914526 on Feb 15, 2012 9:26 AM
    Edited by: user5914526 on Feb 15, 2012 9:29 AM

    No, it doesn't .
    And return the message: "There aren't data in the List of Values"
    And the block item is not empty or null.
    Edited by: user5914526 on Feb 15, 2012 10:13 AM

  • How to populate list of values on screen load

    Hi all,
    I have a list of values based on another field (ANOTHER_FIELD).
    e.g.
    select value d, value r
    from table_name
    where id = :ANOTHER_FIELD;
    ANOTHER_FIELD has default value.
    But when the screen is opened the list of values doesn't get the default value and the list of values is empty.
    Just when submmiting the form, the list of values is populated.
    Please tell me how can I populate the list of values on screen load.
    Thanks!

    Hi,
    So, you have created a computation for ANOTHER_FIELD but the related list still does not get any values? And, the default value for ANOTHER_FIELD is a valid value that can be used to populate the related list?
    Have you set anything for the "Display Null" settings for the related list? Or, is the default value a value will always be in the list?
    Andy

  • Most urgent:::: passing parameter list  to reports containing record groups

    hi
    can any one help me , i am getting frm-41214 when i pass a paramter list containing record group as data parameter to run_report_object as parameter, calling report from forms 10g, but when i dont pass the parameter list the report runs displaying no data(as it should do), otherwise it dont run and display the frm-41214
    zulfiqar

    Hi!
    To suppress Oracle Reports native Parameter Form just add:
    add_parameter( pl_id, 'pARAMform', text_parameter, 'NO' );
    Andrew Velichko
    Brainbench MVP for Oracle Developer 2000 http://www.brainbench.com
    null

Maybe you are looking for

  • My Labview Report generator is not working with 2013 excel version

    Hi All, My report generator tool kit which was developpend using labview 2011 was workign with excel 2010...after that i installed 2013 excel and the code is not working.. Do i need to enable some setting to work with excel 2013. Basically this gener

  • Runtime error when updating service item with BAPI PO CHANGE

    Hi, I get rutime error TABLE_INVALID_INDEX after calls: BAPI_PO_CHANGE-> PROCESS_NON_INTEGRATED_COMP-> CHANGE_PO_SRV_ITEM -> MS_CHANGE_SERVICE_PACKAGE_PO -> ROW_IN_PO -> CHECK_ACC_PO -> MS_CHANGE_ACCASS_PO -> ESKL_UPDATE. the reason is, that ESKL int

  • Itunes extras for previously purchased movies

    I purchased a movie about a month before the the iTunes extras was available for that movie. Is there a way to get the extras for a movie I already own on the newest version of iTunes?

  • Bridge between DropTarget  and TransferHandler

    Bridge between DropTarget and TransferHandler Hypothetically, what if you have: 1) old code which uses a DropTarget to tie together a JEditorPane and a DropTargetListener 2) the desire to set on newish GUI code a TransferHandler. It�s a custom GUI Tr

  • Speed limit on wrt54gs

    Hi all. I have 2 PCs connected to the net via my wrt54gs router, one through a cabale and the other one wirelessly. Is there any way to set the speed limit for the wirless or both PCs? Like make it 50/50 all the time. Thanks. Regards.