Passing parameter in report for order by clause

how can we pass the name of the column on which we want the order by clause to sort as a parameter through parameter from in a report??

Hi Guptha,
We can create a bind parameter in report and we can send it as a parameter or enter in the parameter form.
The Query will be
select * from emp
order by :Order_Bu_Column
I think it will help you.
Regards,
Siva.

Similar Messages

  • Passing parameter to report title

    I am working with drill down report. My master ( Source ) report has
    Emp #, Emp Name, Address columns.
    I have prompt on Emp Name column. My second (target) has other employee details and report title is “ Individual Detail report for Employee” but my user is asking they want to display report name with employee name .( passing parameter to report title) . I mean in source report if I click on “Roy Rine” target report should display with following title
    “Individual Detail report for Roy Rine”
    Can I do this one with OBIEE? Please help me.
    Thanks for your time

    Its working but it is repeating names . i mean i have 4 people hvae name "Roy Jermon" . if i click on this column
    report is displaying ' INDIVIDUAL REPORT FOR ROY JERMON ROY JERMON ROY JERMON ROY JERMON"
    is ther any way we can control for only one time even if we have mutiple values.
    i am really appriciate for your time.

  • How can I pass parameter from report to form?

    Hi :)
    Now I try to build conference room like this by using form
    and report. And i design that when users click at group report
    then i'll show page that contain questions report and add
    question form. And question form and report must receive the
    same parameter from group report.
    First Problem: is I don't know how group report send the
    same parameter to question report and add question report at the
    same time. And is it possible??? If not please suggest me what
    should I do???
    Second Problem: is I don't know how can I pass parameter from
    report to form. I don't know the way to do it.
    Please tell me!!! Please...
    I look forward to hearing from all of you.
    Thank You.

    One way is to create a link based on that form and attach that
    link with the report. Through links you can pass parameters

  • Sorting technique used by oracle for "order by" clause.

    Hi All,
    it could be very help to me if you provide some information about sorting technique used by oracle engine for order by clause.
    Issue i am facing :
    Table : xx
    Line Date
    1 05-06-2013 00:00:00
    2 05-06-2013 00:00:00
    when we query above table using order by date, it is returning line 2 prior to line 1. we would like to know why it is returning line 2 first?
    Regards,
    Ram

    >
    it could be very help to me if you provide some information about sorting technique used by oracle engine for order by clause.
    >
    Well ok - but be warned that many people wind up being sorry they ask that question. Hopefully Hemant's answer is what you really wanted.
    See 'Linguistic Sorting and String Searching' in the Oracle® Database Globalization Support Guide
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch5lingsort.htm
    Sorting will be controlled by the settings of NLS_LANGUAGE, NLS_SORT and NLS_COMP.
    Here is the doc page for NLS_SORT
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch3globenv.htm#i1008393
    >
    NLS_SORT specifies the type of sort for character data. It overrides the default value that is derived from NLS_LANGUAGE.
    NLS_SORT contains either of the following values:
    NLS_SORT = BINARY | sort_name
    BINARY specifies a binary sort. sort_name specifies a linguistic sort sequence.
    >
    And the one for NLS_COMP
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch3globenv.htm#i1008458
    >
    The value of NLS_COMP affects the comparison behavior of SQL operations.
    You can use NLS_COMP to avoid the cumbersome process of using the NLSSORT function in SQL statements when you want to perform a linguistic comparison instead of a binary comparison. When NLS_COMP is set to LINGUISTIC, SQL operations perform a linguistic comparison based on the value of NLS_SORT. A setting of ANSI is for backward compatibility; in general, you should set NLS_COMP to LINGUISTIC when you want to perform a linguistic comparison.

  • Using bind varaible for order by clause

    Hello
    Can some one suggest for the following scenario?
    My order by clause will be constructed based on the selected fields in the form. And now the order by clause need to be passed as parameter to Excel report.
    When I use Ref cursor and OPEN-FOR-USING clause, data is not sorted.
    do we have any other alternate for this?
    Please observe the example code for the same. Block below resembles the code for to select the data for excel report.
    SQL> select * from t;
    T
    sdf
    der
    gdr
    ghft
    ytut
    lkrt
    rtrt
    tyrt
    SQL> declare
    2 l_order_by VARCHAR2 (100);
    3 l_test varchar2(10);
    4 TYPE TEST IS REF CURSOR;
    5 c_TEST test;
    6 L_string VARCHAR2(2000):= 'select * from t order by :pi_order';
    7 begin
    8 l_order_by := ' t DEsc';
    9 open c_test for l_string using l_order_By;
    10 loop
    11 fetch c_test into l_test;
    12 exit when c_TEST%notfound;
    13 dbms_output.put_line (l_test);
    14 end loop;
    15 close c_test;
    16 end;
    17 /
    sdf
    der
    gdr
    ghft
    ytut
    lkrt
    rtrt
    tyrt
    PL/SQL procedure successfully completed.
    Cheers
    Ram Kanala

    My order by clause will be constructed based on the selected fields in the formDoes this look like you need ?
    SQL> var so number
    SQL> exec :so := 1;
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> declare
      2   rc sys_refcursor;
      3   type emprec is table of emp%rowtype index by pls_integer;
      4   erec emprec;
      5  begin
      6 
      7   open rc for 'select * from emp order by ' ||
      8   'decode(:p,1,ename,2,deptno,3,sal,null),' ||
      9   'decode(:p,4,ename,5,deptno,6,sal,null) desc' using :so,:so;
    10   fetch rc bulk collect into erec;
    11   close rc;
    12 
    13   for i in 1..erec.count loop
    14    dbms_output.put_line('Ename = ' || erec(i).ename || ', deptno = ' || erec(i).deptno || ', sal
    = ' || erec(i).sal);
    15   end loop;
    16  end;
    17  /
    Ename = ADAMS, deptno = 20, sal = 1100
    Ename = ALLEN, deptno = 30, sal = 1600
    Ename = BLAKE, deptno = 30, sal = 2850
    Ename = CLARK, deptno = 10, sal = 2450
    Ename = FORD, deptno = 20, sal = 3000
    Ename = JAMES, deptno = 30, sal = 950
    Ename = JONES, deptno = 20, sal = 2975
    Ename = KING, deptno = 10, sal = 5000
    Ename = MARTIN, deptno = 30, sal = 1250
    Ename = MILLER, deptno = 10, sal = 1300
    Ename = SCOTT, deptno = 20, sal = 3000
    Ename = SMITH, deptno = 20, sal = 800
    Ename = TURNER, deptno = 30, sal = 1500
    Ename = WARD, deptno = 30, sal = 1250
    PL/SQL procedure successfully completed.
    SQL> exec :so := 2
    PL/SQL procedure successfully completed.
    SQL> /
    Ename = CLARK, deptno = 10, sal = 2450
    Ename = KING, deptno = 10, sal = 5000
    Ename = MILLER, deptno = 10, sal = 1300
    Ename = JONES, deptno = 20, sal = 2975
    Ename = FORD, deptno = 20, sal = 3000
    Ename = ADAMS, deptno = 20, sal = 1100
    Ename = SMITH, deptno = 20, sal = 800
    Ename = SCOTT, deptno = 20, sal = 3000
    Ename = WARD, deptno = 30, sal = 1250
    Ename = TURNER, deptno = 30, sal = 1500
    Ename = ALLEN, deptno = 30, sal = 1600
    Ename = JAMES, deptno = 30, sal = 950
    Ename = BLAKE, deptno = 30, sal = 2850
    Ename = MARTIN, deptno = 30, sal = 1250
    PL/SQL procedure successfully completed.
    SQL> exec :so := 5;
    PL/SQL procedure successfully completed.
    SQL> /
    Ename = BLAKE, deptno = 30, sal = 2850
    Ename = TURNER, deptno = 30, sal = 1500
    Ename = ALLEN, deptno = 30, sal = 1600
    Ename = MARTIN, deptno = 30, sal = 1250
    Ename = WARD, deptno = 30, sal = 1250
    Ename = JAMES, deptno = 30, sal = 950
    Ename = SCOTT, deptno = 20, sal = 3000
    Ename = JONES, deptno = 20, sal = 2975
    Ename = SMITH, deptno = 20, sal = 800
    Ename = ADAMS, deptno = 20, sal = 1100
    Ename = FORD, deptno = 20, sal = 3000
    Ename = KING, deptno = 10, sal = 5000
    Ename = MILLER, deptno = 10, sal = 1300
    Ename = CLARK, deptno = 10, sal = 2450
    PL/SQL procedure successfully completed.Rgds.

  • Pass parameter in report 9i

    Hi I have a requirement for goods reciept note report:
    where we need to pass a paramater call delivery to,this parameter has independent valueset as store and customer.
    If we pass Store as delivery to parameter status of back ordered items in the report list should have comments as no-stock with respect to its line info.
    and if the delivery to param is to customer then no comments should be there in report.
    How to shcieve this independent params refelct in reports column with respect to item status.
    Thanks & Regards,
    Meera

    Not sure what you're asking, but it sounds like a Reports questions, in which case it would be better posted in the Reports forum...
    Reports

  • Hw to pass parameter from report to forms

    Dear Friends,
    I m working on Forms n Reports 6i,
    I m running report n passing parameter from the forms now the requirement is that if report run successfully it shuld give the msg otherwise give an user define error msg.
    Hw do i pass any parameter from report to form for acknowledgment.
    Thanking yours
    Chandan

    Hi Rajat,
    using run_product built in i can pass parameter from forms to reports but hw can i get some parameter value from reports to forms as mentioned earlier my post
    Thanking Yours,
    Chandan

  • How pass parameter to report?

    i want to have a report which show the orders of a certain customer
    select order_date , customer_name , order_value from orders
    where customer_id = my_variable
    my variable is the parameter to be passed to the report
    How can i pass the value to the report where parameter name is my_variable
    help
    Best Regards
    Mohamed Hammed

    Hi all,
    Finally i got succeed
    here is a sample code
    and here is how to call a report from a form
    1-Form
    Create Button Action
    Custom
    declare
    input_MEMBERSHIP_NUMBER number;
    l_url varchar2(2000);
    begin
    input_MEMBERSHIP_NUMBER:= p_session.get_value_as_number( p_block_name => 'DEFAULT',
    p_attribute_name => 'A_MEMBERSHIP_NUMBER');
    l_url :=
    'http://servername:7778/pls/portal/PORTAL_DB.SPECIALIZATION_REMOTE.show?p_arg_names=input_MEMBERSHIP_NUMBER&p_arg_values='||input_MEMBERSHIP_NUMBER;
    portal.wwa_app_module.set_target(l_url);
    end;
    2-report
    SQL Used in the report:
    select * from PORTAL_DB.SPECIALIZATION_tab where
    SPECIALZATION_DELETE_DATE IS NULL
    AND MEMBERSHIP_NUMBER = :input_MEMBERSHIP_NUMBER
    order by DEPARTMENT_CODE

  • Report for Order and spare parts

    Hello every one, i am looking for a report which can tell me order number wise use of spare parts. It can be either in order or some seprate report. I have not find any such report till yet. Kindly help me in this.
    Regards
    Abhishek

    Baed on the requiremtns given, IW13 can also be auseful report for you.
    SM

  • Passing Parameter to report (html) from html page

    Hi
    I have a html page use web application server as tool, this page
    link to report, I want to pass the parameter to report
    paramform.
    This is my PL/SQL
    procedure eqp_form(ceqp in out mms_eqp_master.eqp_code%type) is
    htp.tableData(htf.anchor(report.print('msr_eqp_group'),'<font
    color=ffffff>Eqp Group
    Report</font>',cAttributes=>'target=target_blank'));
    How can I do to pass 'ceqp' into report parameter form, before
    running report?

    <p>In the scenario you described the report that connects to the stored procedure will automatically require parameters so they can be passed to the stored procedure.</p><p>Here is a link to a sample that passes a parameter to a report at runtime using BusinessObjects Enterprise XI R2:</p><p>http://diamond.businessobjects.com/node/1018 </p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • Pass parameter to reports server

    1 – I’ve created a report with the following query
    select * from scott.emp where depno = :pdep
    2 – then I configured an oracle portal to access this report
    3 – then in the portal in the tab optional parameters I put the parameter pdep
    4 – Executing through the option Customize in the portal, putting a value to the parameter pdep, the report runs perfectly
    5 – Runnig the report through a pl/sql like:
    htp.tableData(htf.anchor('MANAGER.RPT_BOLETO.show?pdep=' || i..deptno,htf.img( './docs/FOLDER/GESTETNER/IMGS/B.GIF', calt => 'GERAR BOLETO BANCARIO', cattributes => ' border=0"')),'center');
    I get the message PARAMETER MISMATCHE
    6 – I observed that if I change the parameter p_pdep the error doesn’t happen, but the parameter don’t go the report server and the report comes blank
    How can I pass this parameter to reports server?

    Hi Mandeep,
    Could you please tell me how can i pass data parameter from forms to report through run_product.

  • Problem while passing parameter from report to report.

    Hi
    I'm using forms and reports 10g, hava a problem while passing the parameter from reports to report.
    i'm using srw.set_hyperlink to call report from report.
    i have created a key value in the cgicmd.dat file called
    faccre802005-2006: report=faccre80 destype=cache desformat=pdf userid=<userid/passwd@cs> server=<servername>
    Now in the format trigger i'm using this key value
    function BTN_DEBITFormatTrigger return boolean is
    temp varchar2(5000);
    IP_ADDRESS VARCHAR2(50);
    SERVER_NAME VARCHAR2(10);
    L_ACCT_CODE VARCHAR2(14);
    begin
    SELECT MAST_INT_DESC,MAST_USER_PGM_ID INTO IP_ADDRESS,SERVER_NAME FROM MAST_INT_INFO WHERE MAST_INT_ID='VISHWA';
    temp := IP_ADDRESS||'?faccre80'||:P_FIN_YEAR||'+server='||server_name;
    temp :=temp ||'+'||'P_PREVIOUS_CODE='''||:ACCT_CODE||''''||'+'||'P_COMPANY_CODE='''||:P_COMPANY_CODE||'''';
    temp :=temp ||'+'|| 'P_FROM_DATE='''||TO_CHAR(:P_FROM_DATE,'DD-MON-RRRR')||''''||'+'|| 'P_TO_DATE='''||TO_CHAR(:P_TO_DATE,'DD-MON-RRRR')||''''||'+'||'P_TRUST_CODE='''|| :P_TRUST_CODE||'''';
    temp :=temp ||'+'|| 'P_UNIT_CODE='''||:P_UNIT_CODE||''''||'+'||' P_FIN_YEAR='''||:P_FIN_YEAR||'''';
    temp :=temp ||'+'|| 'P_LEVEL='''||:P_LEVEL||''''||'+'||'P_HEADER='''||replace(:P_HEADER,' ','%20')||''''||'+'||'P_FORMAT='''||:P_FORMAT||'''';
    SRW.Set_Hyperlink(temp);
    END;
    return (TRUE);
    end;
    Report is coming but not the expected result because parmaeters are not coming from first report to second report.
    If i dont use cgicmd file userid and password are displyed in the URL.
    Pl tell me how to pass parameter from one report to another.
    thanks and regards

    Hi
    I got the solution.
    I forgot to add %* at end of the KEY value.

  • How to pass parameter into cursor for loop ?

    Hi Experts,
    I want to pass parameter l_bom_header_tbl(i).assembly_item_name into the for statement below How to achieve this?
    for j in 1 .. l_bom_components_tbl.COUNT LOOP
    Thanks

    Maybe i failed to describe in detail,so here i go:
    I have two for loops:
    for i in 1 .. l_bom_header_tbl.COUNT LOOP --1st For Loop
    V_bom_header_tbl.organization_code :='DSC';
    V_bom_header_tbl.assembly_item_name:= l_bom_header_tbl(i).assembly_item_name ;
    k:=1;
    I want to pass parameter l_bom_header_tbl(i).assembly_item_name into the for statement below: How to achieve this?
    for j in 1 .. l_bom_components_tbl.COUNT LOOP *2nd For Loop*
    v_bom_components_tbl(k).Assembly_Item_name := l_bom_header_tbl(i).assembly_item_name ;
    k := k + 1;
    end LOOP;
    end loop;
    end;
    I want to pass a paramter into second for loop in such a way that it accepts from the first for loop
    for j in 1 .. l_bom_components_tbl.COUNT LOOP -2nd loop
    Edited by: ILovePlSql on Mar 22, 2010 12:25 PM

  • Database Settings for order By Clause

    Hi,
    In oracle if we do a "order by" in SQL statement for field values whose values are empty, then they would be listed at the last if we dont specify any NVL() for it.
    Is there any other option by which the funcionality of Order by clause with Empty field values can be changed.
    Is there any settings that can be made in the existing database , so that the Order by clause does not list the empty field values at the bottom.
    Thanx in advance.
    Bharath

    you can do wonders with decode and nvl
    for instance:
    order by decode(nullable_field, null, 1, 2)would make all your null fields come first, whereas
    order by nvl(nullable_field, 'M')would make them appear in the middle of an alphabetical list.
    Basically NULLs are not something. You have to give the ORDER BY something to replace the null.
    null

  • Confirmations report for orders

    Hi Experts ,
    Is there any single report which shows the confirmations done for different orders?
    In our scenario , we do time confrmations for different orders that includes PS / PM orders / PP Orders / Internal Orders .
    Now the client want to see the report for all these confirmations in a single report .
    Please suggest....
    Regards
    Judy

    Hi,
    I think there is no such report which give the details of confirmation of all the order types ( PS,PP, PM etc ) in one report.
    As I understand ,  you will have to get this information thru a Query. Get the information for Order type and confirmations from all the order types in one report output.
    Hope this helps.
    Warm regards,
    Srinivas Potluri

Maybe you are looking for