How to define Lexical Parameter in Oracle report.

Dear all,
I need to know that how i will define lexical parameter in query of report builder
i have like this
SELECT R.EXCEPTION_MESSAGE EXP_MESSAGE,
ER.PROD_ID PRODUCT,
ER.TNAME SEGMENT1 ,
DECODE(R.STATUS,'Y','ROW',
'L','TABLE',
'Z','CIB LEVEL',
NULL) STATUS,
NVL(COUNT(*),0) CNT
FROM EXCEPTION_RECORDS ER,CIB_PROC_TABLES_RULES R
WHERE ER.TABLE_ID=R.CIB_TABLE_ID
AND ER.EXP LIKE '%'||R.EXCEPTION_MESSAGE||'%'
AND ER.BRWR=:v_brwr
&v_where
GROUP BY R.EXCEPTION_MESSAGE,ER.PROD_ID,ER.TNAME,R.STATUS
ORDER BY 2
It is giving an error

V_WHERE should be defined same way as regular parameter. It should acquire certain value that makes the query syntaxically correct bofore the sql is run, usually in the After Param Form trigger, e.g.
v_where := 'WHERE 1=1';
...

Similar Messages

  • How to is lexical paramter in oracle reports

    I have a query like,
    select * from t1 where &c1=:v_srep;
    where t1 is tablename
    c1 is column name
    How do I create &c1 and how should I populate it ?
    Thanks,

    Pl see
    How to use lexical paramter in oracle reports

  • Lexical Parameter in Oracle Reports . . .

    Hi all,
    I am trying to pass a value to a query in oracle reports . . .
    the use of the parameter is to add 2 additional columns to an existing query, if a bind parameter is set to 'Yes' else the parameter carries a value NULL;
    Here is the code I have written in After Parameter Form:
    if :P_ROLL_DETAIL_PRN='Yes' then
    :P_CUSTOM_CODE:=NULL;
    :P_CUSTOM_CODE:=:P_CUSTOM_CODE||'wdd.LOT_NUMBER' ||','||'wdd.SUBLOT_NUMBER';
    else
    :P_CUSTOM_CODE:='';
    end if;
    P_Roll_detail is the bind parameter . . and P_CUSTOM_CODE is the Lexical Parameter . ..
    It works for value 'No' of P_ROLL_DETAIL .. . but for Value 'Yes' I get an error . . .
    REP-0499: Column '' selected by the query is incompatible with report defination
    Kindly help...
    Regards
    Jagan

    Lexical parameters can not be used to change the number of selected columns. Consider selecting max number of columns always, but populating last two columns with either NULL values or table columns based on the parameter. Also, manipulations can be done in the layout model using format triggers.

  • How to use lexical paramter in oracle reports

    I have a query like,
    select * from t1 where &c1=:v_srep;
    where t1 is tablename
    c1 is column name
    How do I create &c1 and how should I populate it ?
    Thanks,

    From Oracle 8.1.5 database, we can use dynamic ref cursors.
    With dynamic ref cursor we can really avoid the use of lexical parameters in Reports.
    With static ref cursor this is not possible in all cases.
    For example, if we need dynamic WHERE, we practically can't use static ref cursor.
    But, problem is that Reports needs static ref cursor type for building Report Layout.
    Solution (as i know, first published in my post in MetaLink Reports Forum,
    thread "Report based on Ref Cursor or PL/SQL Table", 24-Aug-01) is:
    in package specification we must have both ref cursor types,
    static for Report Layout and dynamic for ref cursor query.
    Dynamic ref cursor examples:
    "Dynamic Table in the Second Query with Oracle Reports"
    http://www.quest-pipelines.com/pipelines/plsql/tips03.htm#JULY
    "Using a Collection Instead of a Temporary Table in Complex Reports"
    http://www.quest-pipelines.com/pipelines/plsql/tips03.htm#NOVEMBER
    Regards,
    Zlatko Sirotic

  • How to run the parameter form example report :pform_report.jsp

    how to run the parameter form example report : pform_report.jsp ?
    I got these error message:
    Reports Error Page
    Sat Oct 18 11:58:24 CST 2003
    javax.servlet.jsp.JspException: rwlib-1: REP-6106: (, 4 L, XML 1h��/�� ' PI with the name 'xml' can occur only in the beginning of the document.'.
    javax.servlet.jsp.JspException: rwlib-1: REP-6106: (, 4 L, XML 1h��/��
    PI with the name 'xml' can occur only in the beginning of the document.'.
         at oracle.reports.jsp.ObjectsTag.doEndTag(ObjectsTag.java:180)
         at examples.tools._pform__report._jspService(_pform__report.java:79)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:66)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:539)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:285)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:771)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:152)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:796)
         at java.lang.Thread.run(Thread.java:484)

    repost !
    please help!

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • How to use a parameter of a report program in a dialog program

    how to use a parameter of a report program in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter in a report program in a dialog program

    how to use a parameter in a report program in a dialog program

    Hi Shaikh,
    Post it in http://scn.sap.com/community/abap
    "ABAP Development".
    sree

  • Lexical Parameter in Matrix Report

    Hi ,
    I am faced a problem when i used lexical Parameter in Matrix Report.
    I design Query and Report in Group Above Mode The Lexical Parameter
    Show the Values in the Field but when I make This Report in Matrix then
    This Lexical Parameter Showes The Value Null I try many Solution
    But it shows null value in the Output
    Thanks

    i think you didn't read that i'm mentioned
    in datatemplate
    <parameters>
    <parameter name="P_YOUR_PARAM" dataType = "number" defaultValue="0"></parameter>
    </parameters>
    <sqlStatement name="Q_DATA">
    <![CDATA[
    select &your_columns
    from  &your_tables
    where &your_where_clause
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReportTrigger" source="XX_YOUR_PKG.BeforeReport"/>
    <dataStructure>
    ...in package
    FUNCTION BeforeReport RETURN BOOLEAN IS
    BEGIN
    IF P_YOUR_PARAM = 'some_value' THEN
      your_columns := 'column1, column2';
      your_tables := 'table1, table2';
      your_where_clause := 'table1.id = table2.id';
    ELSE
      your_columns := 'column3, column4';
      your_tables := 'table2, table3';
      your_where_clause := 'table2.id = table3.id';
    END IF;
    END;you can use another way - create your xml output by package like
    fnd_file.put_line(fnd_file.output, '<ROWSET>');
    fnd_file.put_line(fnd_file.output, '<ROW>');
    fnd_file.put_line(fnd_file.output, '<DAT>' || some_value || '</DAT>');
    fnd_file.put_line(fnd_file.output, '</ROW>');
    fnd_file.put_line(fnd_file.output, '</ROWSET>');in package you can use all that you want

  • How to use lexical parameter in report

    i want to use lexical parameter in report and pass parameter from form how it is possible in detail
    A.R

    Hi,
    typically you fill your lexical paramter in the after-paramform-trigger out of the values of your bind-parameters (giving end users directly control over lexical parameters might not be a good idea). Inside PL/SQL a lexical parameter is referenced like bind parameters with ":". In the query it's referenced via "&" and represents a part of the query.
    A simple example.
    - p_deptno as bind parameter
    - p_where as lexical paramter
    - end user choose value for p_deptno (10,20,... or nothing)
    - Trigger: if :p_deptno is not null then
    :p_where := 'WHERE deptno = :p_deptno'
    else
    :p_where := null;
    end if;
    - Query select ... from emp &p_where
    Regards
    Rainer

  • How to use LIKE function with a parameter in Oracle REPORT builder??

    how could i use parameter inside a LIKE function in Oracle reports builder?
    it works in SQL plus, but not in report builder!!
    Example:
    select code,desc from item_master where desc
    like '%&give_desc%'; ---works in SQL
    like '%:give_desc%' ---doesn't work in report builder!!

    Hi Renil,
    You will need to use the wildcard character (%) and the concatenation character (||) to join to your user parameter.
    i.e. like '%'||:give_desc||'%'
    Regards,
    John

  • How to pass Parameter to Oracle Report from portal

    Dear All
    I create a report use Oracle Report, and the file name is "Account.rdf"
    This report have a start date parameter and a end date parameter. I put this
    report to the report server, and then add a new entry to the cgicmd.dat file,
    so i enter the URL into IE and pass the start date and end date parameters to
    the report.
    And now, i want to put this report into portal, but how can i config the
    start date parameter and the end date parameter?? i want provide a interface
    to the end-user, so user can select which date he want to display. It is
    possible?? How can i config?? Would you give me some idea.
    Thanks for your help.
    Tony

    You will have to Register your .rdf in Oracle Portal. The following document gives details.
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=170178.1

  • How to pass bind variable into oracle reports 6i - Parameter form

    Hello All,
    I want to pass bind variable into Oracle Reports 6I - Parameters.
    I have tried out that but got the below error :-
    rep-0781 : Bind variables are not allowed in the select statement
    Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
    Thanks
    HARSH SHAH

    Hi,
    may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
    but u can full fill user requirement using oracle forms
    create a form as like as report parameter window
    then create parameter list and run report
    PROCEDURE Run_Emp_Report IS
      pl_id ParamList;
    BEGIN
      pl_id := Get_Parameter_List('tmpdata');
      IF NOT Id_Null(pl_id) THEN
        Destroy_Parameter_List( pl_id );
      END IF;
      pl_id := Create_Parameter_List('tmpdata');
      Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
      Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    thanks
    mostafiz mitul
    Dhaka Bangladesh

  • How to show unhidden parameter in linked report in report manager in ssrs ?

    Hi,
    in my ssrs report1 i have added a image,if i click on that image it will redirect to report2 and it will take parameters from report1 automatically and all parameters are in report2 are hidden because it will consider report1 parameters,but here my requirement
    is 
    in report2 i have total six parameters and all are hidden,i want to show the one of the hidden parameter(LOB) in report,so, i was set visibility property to visible, now i am able to see that one parameter(LOB).
    but after deploying the report in report manager,when i click on the image it is not showing the parameter(LOB)
    Do i need to change anything in image properties?please let me know
    Please help me with this issue how to show the that one particular parameter(LOB) in report manager which is unhidden?, it is an urgent requirement. 
    here we are building reports on cube.
    Please let me know if you need more information.
    Thanks in advance,
    Naveen

    Hi Naveen,
    As per my understanding, since the purpose of a drill-through report is to pass the parameters from main report to the details report, we wouldn't want users to see or modify the parameters in the details report. Therefore, by default, the parameter pane
    is automatically hidden in the details report.
    In this scenario, we can try to use “Go to URL” instead “Go to report” option to work around this issue. If the parameters are multi-value parameters, we can use the expression to like below:
    ="javascript:void(window.open('http://server_name/reportserver?/Report_folder/Report_name&A=" &Join(Parameters!B.Value,"&A=") & "','_blank'))"
    If the three parameters are single-value parameters, we can use the expression to like below: ="javascript:void(window.open('http://server_name/reportserver?/Report_folder/Report_name&A=" & Parameters!B.Value & "','_blank'))" 
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to generate Excel files in Oracle Reports

    Hi,
    I've already built a JSP using oracle reports and Deploy on the report service. I also add a button to the left of the JSP.The next thing I want to do is:when user click on the button, the system will prompt a excel file contains the same content as the JSP file.
    Can anybody teach me how to do? Thanks very much

    Hi Ni,
    It may not be possible to see the output of the SAME report in Excel as well. You will have to design another report which can open in Excel. You can follow this demo:
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/excel/index.html
    Then you can add an action to your button so that it opens the new report in a new browser window. This new browser window will open MS Excel and show the report inside Excel.
    The reason that you can't output the SAME report in HTML as well as MS Excel is because we use page contentType to specify the application that the browser should open the document in (the application can be MS Word, MS Excel, etc). For example,
    <%@ page contentType="application/vnd.ms-excel" %>
    But we can only specify one contentType for a JSP, so the report can either be viewed as HTML or inside MS Excel.
    Navneet.

Maybe you are looking for

  • How to share the i-Photo Library on the same i-Mac with 2 Accounts?

    I am using a iMac running OSX 10.8.4. there are 2 accounts, mine and my wife's. we wish to be able to share the i-Photo Library on the same computer. So I copied the i-Photo library from my Library folder to the Users Shared folder and then deleted t

  • Selection of a row in  a table

    Hi, I have a problem with JTable. ...i have just started working with JTables and still have not got a complete hang of how they function. I have a table whose model is "AbstractTableModel". I have different data in each row of the table therefore i

  • IPhone stuck on charging icon? How can I solve it?

    it just stopped charging. I left it charging all the night but nothing changed. I even tried to reset the iPhone but when ends the process it just switches off again! Is there some way to solve this? thanks

  • Importing directly to Excel

    OracleBI Discoverer 10g (10.1.2.3) Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26) Discoverer Model - 10.1.2.55.26 Discoverer Server - 10.1.2.55.26 End User Layer - 5.1.1.0.0.0 End User Layer Library - 10.1.2.55.26 Office 2007 (excell

  • Is the Early Termination Fee extended too?

    Verizon usually has a 14-day return policy and a 14-day period for terminating service without an Early Termination Fee.  But I see that Verizon has extended their return policy right now - according to http://www.verizonwireless.com/ReturnPolicy.sht