Pl-sql report with parameter

Hi
I have created report with region source as pl-sql. In pl-sql block, calling package where i am passing query. In query's where clause i want to pass paramter value which user had selected.
There are two regions on page. On upper part, there is select list, on lower part there is report with pl-sql region but value of select list is not found in query. I am trying to access with bind variable, select list of item :SL_TEXT. But it is not showing any value in it.
How to use select list value in query of report? Or let me know how to use parameter in pl-sql report which is selected in other region?
Thanks in advance

I am attempting to define the variable as a date variable through Oracle BI and yes it does use a colon to signal variable substitution.
So thank you the first way you stated should work.
The only problem I'm running into now I believe steems from the date format that column that I am trying to filter on. It is in what appears to be the worst format possible.
Is it common for dates to be stored in a DD-MON-YY format? (e.g. 01-JAN-08) I thought we as a community had moved past that post Y2K scare. lol.
When I set up the bind variable in BI it allows me to define the date format, much similar to the TO_DATE function but then it says (must be java date format). So I'm thinking that maybe DD-MON-YY is not a java date format.
In that case is there a way to cast or convert my date format in the sql so that it is a supported java date format?
Or should I just give up and pass it as a varchar2?

Similar Messages

  • Does BOXI support crystal reports with parameter references in formulas?

    I am designing a report in Crystal Reports XI Developer that contains parameters, which are passed to a stored procedure and are also used within formulas ( in Crystal Syntax ie. {?FORMAT_ID} ) in the report itself.
    I can run the report successfully in CRXI Developer.  The formulas use the correct values from the parameters entered during execution and everything looks good.
    I then deploy the report to Business Objects Enterprise XI.  I do all of the things necessary to manage the report including setting up the proper database connection information and default parameter values.
    When I run the report using the Crystal Report Viewer, I get the following error message:
    Error in File Forecasting.rpt:
    Error in formula <Report Format>.
    'if (not isNull({?FORMAT_ID} ) ) then
    This field name is not known.
    Details: errorKind
    This happens when I press the "Preview" button in the Manage Object dialog from Crystal or when I run the report using InfoView.
    I have changed the formulas and it doesn't seem to matter what the specific content of the formula is; other than the existence of a parameter reference in the formula.  If I comment out the parameter and replace it with a hard-coded value, it gets through the formula fine.
    Does Business Objects Enterprise XI support crystal reports with parameter references in the formulas?
    Thanks,
    Tim H.

    Hi,
       In Crystal Reports under File -> Report Options >check convert Null Values to default > Verify on first refresh > Verify stored procedures on first refresh.
    This corrected the issue by allowing the query engine time to locate those columns and map them to the query being sent by the report.
    The convert null values was added because those field were being used in the record selection and grouping.
    Regards,
    Vinay

  • SQL Report with Scroll - javascript

    This is an example of Apex SQL Report with Scroll - made with javascript: http://tryapexnow.com/apex/f?p=12090:9
    Waiting for comments here.

    Yes, because of the page generated by APEX, if you use the Report Template APEX 4.0 Standard, the div created for the report table has the ID "with_scroll" but there is another div which actually contains the table, and it's ID is "report_with_scroll", they just add a "report_" in front of it.
    I find the table by searching through the childs of that div: var table = document.getElementById(myRegion).rows[1].cells[0].firstChild;
    You can use the first one, with the ID "with_scroll", but this code line will be longer.
    Also to addapt the script for other report templates, you just need to see the code generated by every template, and correct this line, to get the real table containing your report.

  • SQL report with delete capability

    I want to create a SQL report with the capability of delete rows (show checkboxes next to each row). Is this possible?

    You can create a page type of Tabular Form, remove all buttons but delete, change all the edit boxes to display as text (saves state) and use that.

  • Problem in Runinng a report with parameter form through Run_Report_object

    Hi,
    I am trying to run reports thought RUN_REPORT_OBJECT built-in. It works fine in following cases
    * Run a report without parameter Form
    * Run a report with parameter form by passing parameters through parameter
    List.
    But it did not o\work in following cases.
    * Run a report with parameter form by passing parameters through setting the
    REPORT_OTHER option of SET_REPORT_OBJECT_PROPERTY built-in.
    * Run a report with parameter form by using Reports own parameter form.
    In first case it says un able to run report and does not even submitt the job to the AS. In the second case its submits the job but when i show it with WEB.SHOW_DOCUMENT, it opens the parameter form and when i run the report after filling the parameters, it displays an error page.
    I am using 9iDS and 10g AS, and 10g Database. Please help me.
    Mohib.

    Mohib,
    Run a report with parameter form by passing parameters through setting the REPORT_OTHER option of SET_REPORT_OBJECT_PROPERTY built-in.[...] it says un able to run report and does not even submitt the job to the AS
    This sound like a user error to me and you want to check the parameters and maybe look at the Reports Queue Manager for the exact error message
    Run a report with parameter form by using Reports own parameter form.
    See:
    http://www.oracle.com/technology/products/forms/pdf/10g/frmrepparamform.pdf
    and
    http://www.oracle.com/technology/products/forms/pdf/10g/frmrepparamform.zip
    Frank

  • How can i make a report with parameter?

    hi.
    i'd like make a report with parameter , for example when i run a report at first i fill dates ( from dd/mm/yy to dd/mm/yy) and after that run my query.
    i made a query ( select name,date from x where date between :a and :b) but when i run the report it return no row select.
    thanks

    Hi,
    This is because the query is expecting a value for :a and :b. You should run the customization form first. Enter the values
    for the :a and :b and save it. Next time when you run the report it will always pick up those values. You can also mention the
    values at design time in the customization form display options by specifying the default values.
    Thanks,
    Sharmila

  • Problem of POP LOV  in a  SQL Report  with pagination

    I am using a pop up lov (along with some other fields), HTMLDB_ITEM.POPUP_FROM_LOV(5, null, 'EMPLOYEE_LIST', '20', '50')), in a sql report. This is a report with pagination. Whenever I select any value from pop up lov on first page of the report it gets populated properly in the corresponding text field. But from second page onwards it doesn’t populate any value.
    For example, my report fetches a total of 50 rows, of which I am displaying 15 at a time. The popup lov comes with a text field for each row. Whenever I do select from popup lov for 1-15 rows which come on page 1, the values come up in the text field properly, but for rows 16-30 on second page, 31-45 on third 46-50 on fourth the values do not get populated. When I changed the pagination settings to display 40 rows..the values were still coming properly on page 1(1-40 rows) and not on the next page. Any clues… how to resolve this problem?

    good find. this is a bug that has already been identified and will be corrected in the upcoming patch release for htmldb. a good work-around for now is to use the equivalent declarative options in the tool. so rather than coding your query like...
    select ename , HTMLDB_ITEM.POPUP_FROM_LOV(2, null, 'DEPARTMENT', '20', '50') as "department" from emp
    ...just code it like this...
    select ename , null as "department" from emp
    ...and then use the column attributes screen for your "department" column to indicate that you'd like that col to be rendered as a "Popup LOV (named LOV)" using your DEPARTMENT list of values.
    hope this helps,
    raj

  • Execute SQL Task with Parameter - from DB2 to SQL Server

    I am pulling data from DB2 to SQL Server.
    1st Execute SQL task runs the following against DB2:
    SELECT TIMESTAMP(CHAR(CURRENT_DATE - (DAY(CURRENT_DATE)-1) DAYS - 1 MONTH)) as START_MONTH
    FROM SYSIBM.SYSDUMMY1;
    I'm storing it as a Result Set.
    Next I have a Data Flow Task.  This pulls data from DB2 where the date matches the parameter.
    FROM SCHEMA.TABLE t
    WHERE DATE_TIME_COLUMN= ?
    This works fine. Guessing, because the parameter source is DB2 and the Data Flow source is DB2.
    The problem is, I want to remove existing data for the same date in the SQL table.  IE, if I'm pulling March 2014 data from DB2, I want to be sure there is no March 2014 data in the SQL table.  The main use is for re-runs.
    So, I added another Execute SQL task after the first one that assigns the variable, and before the Data Flow Task. This runs the following statement against SQL Server:
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= ?
    The package fails at the new Execute SQL Task with the following error message:
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "DELETE FROM
    SBO.dbo.tblHE_MSP_FEE_BUCKETS
    WHERE T..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
    Task failed: Execute SQL Task
    SSIS package "Load_MSP_Fee_Buckets_SQL.dtsx" finished: Success.
    The program '[14240] Load_MSP_Fee_Buckets_SQL.dtsx: DTS' has exited with code 0 (0x0).
    I am assuming this is something to do with the Parameter source being DB2, and trying to use against SQL?
    Any suggestions on how to make this work??
    Thanks,
    -Al H

    Parameter name is unrecognized
    is the key, how come DB2 is related if it runs against SQL Server
    What I think is happening you do not use the OLEDB connection to SQL Server.
    Likewise, if it is ADO then the query needs to be
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= @MyDate
    Arthur My Blog

  • View BIP report with parameter in Dashboard, but the parameter  not appear

    OBIEE 10.3.4.1 on Redhat 5.2.
    I have a BIP report with 3 parameters which work fine in BIP. Now I embedded it in BI Dashboard, but not see the parameter menu when view in Dashboard. Is this the feature, or I missed something.
    Thanks.

    On the BI publisher Report Properties window, for Display Mode, select 'Link'. Then you should see the Report Object appear as a link, save and on the dashboard page when you click that link, the BI publisher report will show with the parameters..
    Thanks,
    Bipuser
    Edited by: BIPuser on Jun 3, 2011 9:36 AM

  • Calling report with parameter form using frmrwinteg

    Hi,
    I am calling a report with a parameter screen from a form and am using the frmrwinteg bean. This works fine on our test application server but, when moved onto our production application server, the database logon screen is presented after pressing the submit button on the parameter screen. The cause of the problem seems to be the html generated to simulate the parameter screen. The html on the test application server contains a BASE tag in the HEAD section with an href starting "http:/servername.companyname.com". However, the same tag in the html generated on the production application server is missing the ".companyname.com", causing the cookie produced by the frmrwinteg bean to not be found. Does anyone know how the BASE href tag is generated and what I need to change to get the correct BASE href value? I am using Forms/Reports 10g R2 and Application Server 10.1.2.
    Cheers....

    Appendix "A" of this document describes how cookie_domain works:
    http://otn.oracle.com/products/forms/pdf/10g/frmwebshowdoc_rep.pdf

  • Calling report with parameter screen from form using frmrwinteg

    Hi,
         I am calling a report with a parameter screen from a form and am using the frmrwinteg bean. This works fine on our test application server but, when moved onto our production application server, the database logon screen is presented after pressing the submit button on the parameter screen. The cause of the problem seems to be the html generated to simulate the parameter screen. The html on the test application server contains a BASE tag in the HEAD section with an href starting "http:/servername.companyname.com". However, the same tag in the html generated on the production application server is missing the ".companyname.com", causing the cookie produced by the frmrwinteg bean to not be found. Does anyone know how the BASE href tag is generated and what I need to change to get the correct BASE href value? I am using Forms/Reports 10g R2 and Application Server 10.1.2.
    Cheers.....

    Appendix "A" of this document describes how cookie_domain works:
    http://otn.oracle.com/products/forms/pdf/10g/frmwebshowdoc_rep.pdf

  • Report with parameter form

    I am trying to run the report from menu with the following code
    declare
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    BEGIN
    repid := find_report_object('test');
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME, :global.user_dir||'test.REP');
    if id_null(repid) then
         pause;
         message('repid is null');
         else
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repsrv');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=yes');
    end if;
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repsrv','_blank');
    ELSE
    message('Error when running report');
    END IF;
    END;
    The report parameter form displays
    and when i enter the values
    gives me the error
    REP-52007: Parameter form format error.
    Copyright (c) 2002, 2005, Oracle. All rights reserved.
    java.lang.IllegalStateException: Writer already retrieved     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletResponse.getOutputStream(EvermindHttpServletResponse.java:969)     at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:136)     at oracle.reports.rwclient.RWWriter.getOutputStream(RWWriter.java:263)     at oracle.reports.rwclient.RWReportRunner.sendFile(RWReportRunner.java:355)     at oracle.reports.rwclient.RWReportRunner.getMainFile(RWReportRunner.java:161)     at oracle.reports.rwclient.ServletCmdMgr.handleCmdGetjob(ServletCmdMgr.java:1343)     at oracle.reports.rwclient.CommandManager.handleWebCommand(CommandManager.java:92)     at oracle.reports.rwclient.ServletCmdMgr.handleWebCommand(ServletCmdMgr.java:295)     at oracle.reports.rwclient.RWClient.handleWebCommand(RWClient.java:958)     at oracle.reports.rwclient.RWClient.processRequest(RWClient.java:1442)     at oracle.reports.rwclient.RWClient.doPost(RWClient.java:504)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     at java.lang.Thread.run(Thread.java:534)
    Thanks
    Elsy

    Go to the following page and refer to the section titled: Oracle Forms Services - Using Run_Report_Object to call Reports with a Parameter Form
    http://www.oracle.com/technology/products/forms/techlisting10g.html

  • SQL Report with 1 updatable column - help urgent

    Hi,
    I have a SQL report. I am using collection to store value of selected record by link column.
    I have a updatable text item (NULL) in the column. I am able to store that value in the collection.
    Any clue?
    Code
    1. Creating a collection in parent page:
    apex_collection.create_or_truncate_collection
    (p_collection_name => 'ORDER');
    2. Query to populate item rows with option to key 'QTY' before pressing 'Add to Order' link.
    select
    itemcode,
    description,
    NULL AS qty,
    'Add to Order' add_to_order
    from itemtab
    3. Made 'QTY' to Text item -- to allow users to key value
    4. Created 'hidden & protected' items P1_ITEMCODE, P1_QTY
    5. Set values of itemcode, qty in add_to_order link
    6. Created a process to add values into collection:
    for x in (select * from itemtab where itemcode = :P1_ITEMCODE)
    loop
    apex_collection.add_member(p_collection_name => 'ORDER',
    p_c001 => x.ITEMCODE,
    p_c002 => x.DESCRIPTION,
    p_c003 => :P1_QTY
    end loop;
    7. Display value of itemcode, description, qty in report region
    select c001, c002, c003
    from apex_collections
    where collection_name = 'ORDER'
    Probem: The value of qty is not being stored in the collection and not appearing in the #7 report. itemcode and description values are fine.
    Thanks,
    Dip

    Dip,
    I'm guessing here as I can't see your application, I think your missing the page process to collect the data from your QTY field.
    I created a quick demo of what i think your trying to achieve on apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=19923:2
    I added this to the html expression on the report Field add to:
    <input type="button" onclick="doSubmit(#RANDOM_ID#)" value="Add To" />
    Then the page process to collect and set the page item:
    DECLARE
    l_qty number;
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F03.COUNT LOOP
    l_qty := nvl(APEX_APPLICATION.G_F03(i),0);
    IF l_qty > 0
    THEN
    :P2_QTY := l_qty;
    :P2_RANDOM_ID := :REQUEST;
    EXIT;
    END IF;
    END LOOP;
    END;
    Let me know if this helps
    Mark
    Don't forget to mark reply as helpful or correct as this may help others reading this thread in the future!
    Edited by: cptbutcher on Mar 25, 2010 10:40 PM

  • How to call sql procedure with parameter from java

    Hello,
    i am trying to call one sql procedure with two parameters from java.
    the first parameter is In parameter, the second is OUT.
    the return value of this java method should be this second parameter value.
    the following is my java code:
    protected String getNextRunNumber() {
         String runnumber=null;
         String sql = "{call APIX.FNC_SST_EXPORT.GET_NEXT_RUNNUMBER (?,?)}";
    CallableStatement state = null;
    try{
         Connection con= getDatabaseConnection();
         state = con.prepareCall(sql);
         state.setString(1, m_appKeyExport);
         state.registerOutParameter(2,Types.NUMERIC,0);
         state.execute();
    ResultSet resultR = (ResultSet)state.getObject(2);
         while (resultR.next()) {
              runnumber=resultR.getBigDecimal(1).toString();
    catch (SQLException e){System.out.println("You can not get the export next run number properly");}
    return runnumber;
    i got error message like:
    java.lang.ClassCastException: java.math.BigDecimal
    As far as i knew, if the parameter is number or decimal, we should give also the paramer scale to the method: state.registerOutParameter(), but i still get this error message.
    Please help me to solve this problem.
    Thanks a lot.

    state.execute();
    i try to use debug to find the problem, in this line, i saw
    OracleCallableStatement(OraclePreparedStatement).execute() line: 642 [local variables unavailable]
    is this the problem?

  • Generate Report from SQL Query with Parameter

    I have a web application that needs to generate static PDF reports. What I want to do is:
    1. Use Acrobat to create a form
    2. Open the form programmatically on the webserver
    3. Pass it a parameter such as a "clientID"
    4. Automatically populate the rest of the form using a SQL stored procedure with the clientID as the parameter
    5. Save the form as a static, non-editable PDF and display it for the client to either view/save/print
    Example:
    Database would contain a table called Clients
    ID LastName Location Phone
    1 Doe New York 111-111-1111
    2 Smith California 222-222-2222
    Stored Procedure
    CREATE PROCEDURE GetClient
    @id int
    AS
    SELECT LastName, Location FROM Clients WHERE ID = @id
    GO
    Acrobat Form
    Last Name: [txtLastName]
    Location: [txtLocation]
    Website user requests report for clientID=1. Result is a PDF that looks like this:
    Last Name: Doe
    Location: New York
    I am very new to Acrobat, so please explain in detail how I can go about doing this. Thanks very much in advance.

    Good morning. Did you find a solution to your problem? I'm looking for something to do the same for a from created in Live Cycle 7.0. If you can share some information or examples, I would greatly appreciate it.
    Thanks
    Ernest

Maybe you are looking for

  • ITunes won't run at all after updating 10.5

    I have recently updated iTunes to 10.5, and now it won't run/open at all. Gives me an error and doesn't even open it at all. I have tried everything apple says to do but nothing has worked so far. Please help me, I really want my iTunes running again

  • How can I print from my ipad?

    I have an IPAD 2 and want the ability to print. I think I need to get a new printer with Airprint ability since the printer I have isn't on the compatible list, but not sure what this message means....  AirPrint only works with a network connection t

  • How check the Strategy, if no authorization for SPRO?

    Hello Experts,                        Can someone please help on how to check the Strategy for the Release codes, if we dont have the Authorizations for SPRO in the Production Server. Please help Thank in advance. Regards, Yawar Khan

  • F1 help documentation settings

    Hi Sapiens,    i am not able to  access F1 help  , is there any possible settings needed to be done so that i can access the F1 help . thanks in advance, R.Nair

  • High cost of using iphone

    I have only had my phone for 3 weeks and received a bill for $200.00 all i used the data for was setting up etc , what i would like to know can i use it without itunes as i only use phone for texts,calls, photos , if i take out the sim which is mine