Displaying data in a pl/sql report

Hi,
If the regional settings of the system is german(germany) and if I try to display a procedure output as a report written in pl/sql in .xls format I am getting wrong data displayed.
Ex: If the duration in hours is 5.5 it displays as 05. Mai. Actually i want it to be dispalyed as 5.5 in the .xls file.
Please help me in this regard.
Thanks in advance

This is a typical (German) Excel problem. Excel is converting your values to a date because the German date format mask fits to the German number NLS settings.
There are some solutions to the problem but non is really simple.
1) Create a CSV like file, but do not name it CSV. E.g. Spooloutput.dat with delimiter = '|'. Import this as a text file in excel and use the delimiter.
2) Change your excel settings: "Extras/Optionen/International/Trennzeichen fom Betriebssystem übernehmen" => uncheck this option and choose other chars. Write your number data with those chars.
3) Create an Excel-Readable XML where the column type is supplied. My favourite, but I didn't do it so far.

Similar Messages

  • How to compare two tables data...need sql report or utility to find differe

    Hi,
    We have a requirement where we are asked to find data differences between two tables and one of the tables reside on remote database. The database version is same ( 10g ) and datatypes for the tables are similar.
    The client is looking for a sql report or kind of utility to display the data differences for each column ( if possible count differences ) with some meaningful error messages.
    Could anyone let me know the best possible way of doing it..?
    Thanks
    Hitarth

    Hi,
    I found something for tables comparison but getting one error...can you check this please and let me know what is wrong
    Here is the function:
    CREATE OR REPLACE FUNCTION compare_query_results (
    p_query1 IN VARCHAR2
    , p_query2 IN VARCHAR2
    , p_raise_error_if_not_equal IN BOOLEAN DEFAULT FALSE
    , p_raise_error_if_no_rows IN BOOLEAN DEFAULT FALSE
    RETURN NUMBER
    IS
    -- Constants
    c_query_results_equal CONSTANT PLS_INTEGER := 0;
    c_query_results_not_equal CONSTANT PLS_INTEGER := 1;
    oracr CONSTANT VARCHAR2 (1) := CHR (10);
    -- Variable Declaration
    v_sql_stmt VARCHAR2 (32767);
    v_record_count PLS_INTEGER;
    v_return_code PLS_INTEGER;
    v_record DUAL.dummy%TYPE;
    v_result_set_has_rows BOOLEAN;
    -- Ref Cursors
    v_cursor sys_refcursor;
    -- Custom Defined-Exceptions
    result_sets_do_not_match EXCEPTION;
    query_returns_no_rows EXCEPTION;
    BEGIN
    -- Get the count of differing records between p_query1 and p_query2
    dbms_output.put_line('Start-1');
    v_sql_stmt :=
    ' (SELECT /*+ materialize */'
    || SUBSTR (p_query1, INSTR (UPPER (p_query1)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    , (SELECT /*+ materialize */'
    || SUBSTR (p_query2, INSTR (UPPER (p_query2)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    SELECT ''X''
    FROM (
    (SELECT * FROM test1 MINUS SELECT * FROM test2)
    UNION ALL
    (SELECT * FROM test2 MINUS SELECT * FROM test1)
    dbms_output.put_line('Start-2');
    OPEN v_cursor
    FOR v_sql_stmt;
    dbms_output.put_line('Start-3');
    FETCH v_cursor
    INTO v_record;
    dbms_output.put_line('Start-4');
    v_result_set_has_rows := v_cursor%FOUND;
    dbms_output.put_line('Start-5');
    CLOSE v_cursor;
    dbms_output.put_line('Start-6');
    -- If there are rows - the result sets do NOT match...
    IF v_result_set_has_rows
    THEN
    v_return_code := c_query_results_not_equal;
    IF p_raise_error_if_not_equal
    THEN
    RAISE result_sets_do_not_match;
    END IF;
    -- If there are no rows - the result sets do match...
    ELSIF NOT v_result_set_has_rows
    THEN
    IF p_raise_error_if_no_rows
    THEN
    -- Check to make sure that the queries contain rows if desired...
    v_sql_stmt := 'SELECT ''X''
    FROM (' || oracr || p_query1 || oracr || ')';
    OPEN v_cursor
    FOR v_sql_stmt;
    FETCH v_cursor
    INTO v_record;
    IF v_cursor%NOTFOUND
    THEN
    CLOSE v_cursor;
    RAISE query_returns_no_rows;
    END IF;
    CLOSE v_cursor;
    END IF;
    v_return_code := c_query_results_equal;
    END IF;
    RETURN v_return_code;
    EXCEPTION
    WHEN result_sets_do_not_match
    THEN
    raise_application_error (-20101, 'The Queries'' result sets do NOT match. Error returned
    as requested.');
    WHEN query_returns_no_rows
    THEN
    raise_application_error (-20102, 'The Queries'' result sets match, however they contain no
    rows. Error returned as requested.');
    WHEN OTHERS
    THEN
    -- Raise the error
    raise_application_error (-20103
    , 'There is a syntax or semantical error in one or both queries
    preventing comparison.'
    || oracr
    || 'Error Stack :'
    || oracr
    || DBMS_UTILITY.format_error_stack ()
    || oracr
    || 'Error_Backtrace:'
    || oracr
    || DBMS_UTILITY.format_error_backtrace ());
    END compare_query_results;
    I have created two tables ( test1 and test2 ) with few columns and with the same datatypes and executed the above function...I am getting error as folliowing:
    DECLARE
    ERROR at line 1:
    ORA-20103: There is a syntax or semantical error in one or both queries
    preventing comparison.
    Error Stack :
    ORA-00900: invalid SQL statement
    Error_Backtrace:
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 53
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 121
    ORA-06512: at line 12
    Could someone please help me fixing this error..It would be really appreciated
    Thanks
    Hitarth

  • DATE FORMAT Conversion FOR SQL Reports

    Hi,
    Am building a report and am stuck here where this piece of code that throws the following error
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
    My query goes some thing like this
    DECLARE @StartDate varchar(15),
    @EndDate Varchar(15)
    SELECT @StartDate = '01/08/2014',
    @EndDate = '31/08/2014'
    SELECT DISTINCT
    [Operation] = CASE WHEN p.DATE_OF_START BETWEEN @StartDate AND @EndDate THEN 'Add'
    ELSE 'Update' END
    FROM SNZ_HR_Reporting_POSMGNT as s
    LEFT OUTER JOIN PERSON as p on s.EMP_NO = p.EMP_NO
    WHERE s.CHANGE_DATE BETWEEN @StartDate AND @EndDate
    The date format in the column DATE_OF_START  is like yyyy-mm-dd 00.00.00.000 .
    My question is how to convert this format to dd/mm/yyyy format and execute the queries
    Many Thanks,
    Bhanu

    SQL Date Format:
    http://www.sql-server-helper.com/tips/date-formats.aspx
    Please Mark This As Answer if it helps to solve the issue

  • Urgent help - Updateable column in SQL Report

    Hi,
    I have a SQL report. The collection is being used to manipulate values.
    I have a updatable text item QTY. When someone enter the value of 'QTY' and press
    the link 'Add to order', it should store value of QTY to the collection and display same
    in another region (SQL Report).
    Demo Application: http://apex.oracle.com/pls/apex/f?p=26306:11:2820041747530998
    Workspace :ORAAPPS07
    User ID :[email protected]
    Password :gonena
    Key the 'QTY' value in the Page 12 and click on 'Add to Order'.
    Problem: The value of QTY is not being populated.
    Thanks in Advance.
    Dip

    Hi,
    I have a SQL report. The collection is being used to manipulate values.
    I have a updatable text item QTY. When someone enter the value of 'QTY' and press
    the link 'Add to order', it should store value of QTY to the collection and display same
    in another region (SQL Report).
    Demo Application: http://apex.oracle.com/pls/apex/f?p=26306:11:2820041747530998
    Workspace :ORAAPPS07
    User ID :[email protected]
    Password :gonena
    Key the 'QTY' value in the Page 12 and click on 'Add to Order'.
    Problem: The value of QTY is not being populated.
    Thanks in Advance.
    Dip

  • Conditional display in a SQL-Report/Report Region

    Hi,
    here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
    First you have to put the following javascript code in the Page HTML-Header:
    <script type="text/javascript">
    <!--
    // SOURCE
    // W:\oracle\PRJ DWLS\javascript.07.js
    // Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
    // Help (Substitution Strings):
    // http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
    // HTML Expression:
    // <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
    function ex_conditional_td
    ( p_id
    , p_rownum
    , p_cellnum
      var l_td;
      l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
      // hier die Bedingung definieren
      if (true) {
        l_td.style.color = '#808080';
    }  // -- eof ex_conditional_td -- //
    // Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
    // HTML Expression:
    // <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
    function ex_conditional_tr
    ( p_id
    , p_rownum
      var l_tr;    // TABLE.TR
      var l_td;    // TABLE.TR.TD
      if (true) {
        l_tr = vd_getRow(p_id, p_rownum);
        l_tr.onmouseover = null;
        l_tr.onmouseout  = null;
        for (var i=0; i<l_tr.cells.length; i++) {
          l_td = l_tr.cells;
    l_td.style.backgroundColor = '#DDDDDD';
    } // -- eof ex_conditional_tr() -- //
    var g_DEBUG = false;
    var g_TBODY = null;
    // Liefert das Body-Element der Tabelle mit der ID <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // Return
    // das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getBody
    ( p_id
    if (g_TBODY == null) {
    var l_table = null;
    l_table = document.getElementById( p_id );
    if (l_table == null) {
    l_table = document.getElementByName( p_id );
    if (l_table != null) {
    if (vd_debug()) {
    alert("Tabelle gefunden, " + l_table.nodeName);
    g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
    return g_TBODY;
    } // -- eof vd_getBody() -- //
    // Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // Return
    // die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getRow
    ( p_id
    , p_rownum
    var l_body = vd_getBody(p_id);
    if ( l_body != null
    && l_body.nodeName == 'TBODY'
    && l_body.children[p_rownum].nodeName == 'TR') {
    return l_body.children[p_rownum];
    else {
    return null;
    } // -- eof vd_getRow() -- //
    // Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
    // Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // p_column - der Index der Spalte / Zelle
    // Return
    // die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
    function vd_getColumn
    ( p_id
    , p_rownum
    , p_column
    var l_tr = vd_getRow(p_id, p_rownum);
    if ( l_tr != null
    && l_tr.nodeName == 'TR'
    && l_tr.children.length >= p_column
    && l_tr.children[p_column].nodeName == 'TD') {
    return l_tr.children[p_column];
    else {
    return null;
    } // -- eof vd_getColumn() -- //
    // Rekursives Suchen nach einem Node.
    // Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
    // SQL-Report.
    // Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
    // darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
    // Klasse <p_class> befindet.
    // Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
    // "t10data" formatiert.
    // Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
    // Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
    // selbst ermittelt werden.
    // Der Beispielaufruf:
    // var l_body;
    // var l_node = document.getElementById( 'R112233' );
    // l_body = search( l_node, 'TD', 't10data', 'TBODY');
    // durchsucht also das mit der Id "R112233" versehene Element [der Report, für
    // den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
    // die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
    // definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
    // Parameter
    // p_node - das Ausgangselement
    // p_searchIn - der Knotenname, der durchsucht werden soll
    // [node.nodeName == p_searchIn]
    // p_class - der Name der CSS Klasse
    // [node.classList[<index>] == p_class
    // p_parentName - der Name [node.parentNode.nodeName == p_parentName]
    // des Elements, das zurückgeliefert werden soll. Wird als
    // p_parentName der Suchname p_searchIn angegeben, wird
    // das Element selbst zurückgegeben.
    // Return
    // das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
    function vd_search
    ( p_node
    , p_searchIn
    , p_class
    , p_parentName
    var LN = "vd_search";
    var l_element = null;
    // DEBUG
    if (vd_debug()) {
    alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
    // 1) der aktuelle Knoten ist der, der durchsucht werden soll
    if (p_node.nodeName == p_searchIn) {
    if (p_node.classList.length > 0) {
    for(var c=0; c<p_node.classList.length; c++) {
    if (p_node.classList[c] == p_class) {
    // Parent Node dynmisch suchen
    l_node = p_node;
    if (l_node.nodeName == p_parentName) {
    return l_node;
    while(l_node != null && l_node.parentNode != null) {
    if (l_node.parentNode.nodeName == p_parentName) {
    return l_node.parentNode;
    else {
    l_node = l_node.parentNode;
    // 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
    // weitersuchen
    if (p_node.children.length > 0) {
    var i = 0;
    while (i<p_node.children.length && l_element==null) {
    l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
    i++;
    return l_element;
    } // -- eof vd_search() -- //
    // Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
    // Return
    // true - debug ist eingeschaltet
    // false - debug ist ausgeschaltet
    function vd_debug()
    return g_DEBUG;
    -->
    </script>
    Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
    Second is, that you set an static id for your report region. I prefer this structure:
    R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
    First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
    <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
    Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
    <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum
    c) the cellnum (here we have to subtract 1 to get the "real" cell index)
    The "ex_conditional" functions are just a representation of how to get the row or cell node.
    Hope this help a bit.
    Tom

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • Sql report, How to access current rows 6 columns data

    I have one page having page items & SQL report having 8 columns.
    First column of report is a link for editing.
    on clicking first column, that record gets displayed on page items, which are opn same page.
    Now my problem is i have used link column of report and set 3 page items value on click of link column.\
    But i need to set values for 2 more page items.
    I tried to create computation & process but not working. i am confused about which process point to select & whether onclick page gets submitted or not.
    I tried to write jscript but not succeeded. I dont know how to get current row id in jscript & different column values of current rowid.
    any help.

    Hi,
    Thanks for reply.
    in 5 items, first three are numeric and last two are timestamp fromtime, totime.
    as I mentioned earlier if i interchange 4 & 5 items i.e. now ITEM4 is totime & ITEM5 is fromtime
    and their values. I get value for totime & not for fromtime. all records contain values for all 5 columns. no null.
    So basically their is no problem in value or data, The only problem is whatever sequence is maintained first 4 items get value & 5th item remains blenk.
    Either I type all 5 ITEM NAMES in one Item name-value pair of link or use all three pairs, 5th ITEM remain blank.

  • When i open my SQL reporting URL it says this page cannot be displayed

    Hi All,
    I am using SQL Server 2008 with SP3. When i open my open my reporting manager URL. i get the error as "This page cannot be displayed" HTTP Error 500 internal server error. I read few blogs posted below. Tried both but could not help me out
    http://social.technet.microsoft.com/Forums/en-US/1a03196f-f8ee-4a66-b08b-b2e02447a25e/can-not-open-page-for-report-manager-url-httplocalhost8080reports-for-sql-server-2008?forum=sqlreportingservices
    and 
    http://ashwaniashwin.wordpress.com/2014/02/28/the-url-has-already-been-reserved-error-while-configuring-the-report-server-url-in-reporting-services-configuration-manager/
    But none of them helped.
    I tried deleting the reserved URL and re reserved but still did not help.
    Tried changing the port number but still no luck.
    I analysed the sql reporting error log and found the below.
    ===============================================
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: Unable to validate data.
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: HTTP status code --> 500
    ===============================================
       at ReportingServicesHttpRuntime.BaseWorkerRequest.FilterAndThrowException(Exception e, String message)
       at ReportingServicesHttpRuntime.RsWorkerRequest.GetUserToken()
       at System.Web.HttpContext.get_ImpersonationToken()
       at System.Web.ClientImpersonationContext.Start(HttpContext context, Boolean throwOnError)
       at System.Web.HttpApplication.ThreadContext.SetImpersonationContext()
       at System.Web.HttpApplication.ThreadContext.Enter(Boolean setImpersonationContext)
       at System.Web.HttpApplication.OnThreadEnterPrivate(Boolean setImpersonationContext)
       at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
    library!ReportServer_0-1!e0c!06/07/2014-03:30:49:: Call to GetItemTypeAction(/).
    library!ReportServer_0-1!f10!06/07/2014-03:30:49:: i INFO: Catalog SQL Server Edition = Enterprise
    library!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Catalog SQL Server Edition = Enterprise
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Initializing crypto as user: E2K\Lg161489
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Exporting public key
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Performing sku validation
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:50:: i INFO: Importing existing encryption key
    library!ReportServer_0-1!e0c!06/07/2014-03:30:50:: Call to ListParentsAction(/).
    library!ReportServer_0-1!e0c!06/07/2014-03:30:50:: Call to ListChildrenAction(/, False).
    webserver!ReportServer_0-1!e0c!06/07/2014-03:30:50:: i INFO: Processed folder '/'
    library!ReportServer_0-1!ad4!06/07/2014-03:30:51:: Call to GetPermissionsAction(/).
    library!ReportServer_0-1!f10!06/07/2014-03:30:51:: Call to GetPropertiesAction(/, PathBased).
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPermissionsAction().
    library!ReportServer_0-1!f10!06/07/2014-03:30:52:: Call to ListChildrenAction(/, False).
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    library!ReportServer_0-1!f10!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: Unable to validate data.
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: HTTP status code --> 500
    I have also attached all the logs in a FTP for further analysis. Please download it from the below link.
    https://depositfiles.com/files/cfe6af33b
    Can any one please help me. Seems to be a never ending issue to me.

    Take a look on link
    http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm
    In case If you rebuilt the server then then linking will break , go in encryption keys option if only delete button is enabled, and backup button is disabled the delete the keys .close the report configuration manager and reopen the manager .Now try
    to open report manager url. 
    Please click "Propose
    As Answer" if a post solves your problem, or "Vote
    As Helpful" if a post has been useful to you

  • How to display data in interactive report column without colons (:)

    Dear Apex gurus,
    I'm a newbie and have just created an Apex application from a spreadsheet. I've created a named list of values and used it in a checkbox against a field in the default page 3 Create form.
    When I've selected multiple values in my check box in the form, the data in the interactive report appears as one line with colons separating the selected values like this: Dog:Cat:Bird
    What I would like is to have the data appear in the interactive report column as a multi-line list like this:
    Dog
    Cat
    Bird
    I can work around this by modifying the SQL code in the Region Source of the Region Definition of the report (Default Page 1 interactive report) to replace the colons with <br>
    SELECT replace("PETS_CHOSEN",':','<br>') "PETS_CHOSEN", FROM "MYAPP" Note: this doesn't format properly in the posting. I replace the colon with a html br
    This works, but seems to be a hack to me. I am guessing that I've missed a simple option setting somewhere, but I can't find it.
    The other problem with this solution is that when I export the report to Excel, what is exported is Dog<br>Cat<br>Bird, which is seems worse than colons.
    Thanks,
    - Morgan
    Edited by: mnrussel on 16-Feb-2009 04:13

    Hi Morgan,
    I think you have at least two choices:
    1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
    2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and &lt;br&gt; tags in the on-screen report version
    Andy
    ps - To display tags in a post, use &amp;lt; for &lt; and &amp;gt; for &gt;

  • Display data in log file using PL/SQL procedure

    Just as srw.message is used in Oracle RDF Reports to display data in log file in Oracle Apps, similarly how it is possible to display data in log file using PL/SQL procedure?
    Please also mention the syntax too.

    Pl post details of OS, database and EBS versions.
    You will need to invoke the seeded FND_LOG procedure - see previous discussions on this topic
    Enable debug for pl/sql
    https://forums.oracle.com/forums/search.jspa?threadID=&q=FND_LOG&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    HTH
    Srini

  • Stored Procedure for displaying data in Crystal Reports

    Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.

    from site:-
    Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor

  • Date syntax for MySql query in SQL Reporting Services

    I am currently trying to link a mysql Stored Procedure to a Microsoft SQL Reporting Server. It is coming up with a Syntax error. I believe this is down to the
    Date_from and Date_to Parameters. The query is below any help would be appreciated 
    DELIMITER $$ 
    USE `mydb`$$ 
    DROP PROCEDURE IF EXISTS `DTI`$$ 
    CREATE DEFINER=`linkeduser`@`%` PROCEDURE `DTI`(IN date_from DATETIME, 
    IN date_to DATETIME) 
    BEGIN 
    SELECT title,gender,firstname,lastname,address1,town,postcode,dob,IF(co.start_date = '00-00-0000', '', CAST(DATE(co.start_date) AS DATE)) AS 'StartDate' 
    FROM cf_user AS us 
    JOIN ca_compliance AS co ON co.user_id = us.user_id 
    WHERE co.start_date BETWEEN date_from AND date_to; 
    END$$ 
    DELIMITER ;

    Hello,
    The dataset query runs on the external data source.
     In your case, you create a report by retrieve data from MySQL database with a stored procedure. The stored procedure will run on MySQL Server and return the result in the Report designer or Report Builder. To solved this issue, please execute the stored
    procedure on the MySQL database and check the syntax error.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Display data in smartforms using report

    hi,
    i want to display data from smartform using report.
    i have a preview buttons in report when i select preview buttons displays in smarts
    regards
    amit

    design the smartform as per ur need and get  the function module generated by smartform and pass it to ur report programas below..
    case sy-ucomm.
    when 'smartform'.
    pass the f.m that is generated by system in smartforms
           CALL FUNCTION '/1BCDWB/SF00000265'
        EXPORTING
        ARCHIVE_INDEX              =
        ARCHIVE_INDEX_TAB          =
        ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         =
        MAIL_APPL_OBJ              =
        MAIL_RECIPIENT             =
        MAIL_SENDER                =
        OUTPUT_OPTIONS             =
        USER_SETTINGS              = 'X'
          DATE_L                     = s_fkdat-low
          DATE_H                     = s_fkdat-high
          PLANT_L                    = s_werks-low
          PLANT_H                    = s_werks-high
      IMPORTING
        DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            =
        JOB_OUTPUT_OPTIONS         =
        TABLES
          IFINAL                     = ifinal1[]
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endcase.

  • "no data found" run-time error masking SQL/report mismatch

    Hi all,
    At last, figured out a vexing problem and wondering if anyone else either:
    a) has also hit the problem, and hopefully
    b) has figured out a clever way around it.
    Namely, in our AppEx apps, we rely on SQL query generation from PL/SQL packaged functions. This "best practice" promotes reuse, automated testing, etc. Great idea - works great.
    However, we've repeatedly come across a situation where we go to run a page with a report on it only to get a "report error: ORA-01403: no data found" message where the report should be. Not much to go on. After trial and error, it turns out that simply going to the Region Definition page (where the PL/SQL function call is defined) and clicking the "Apply Changes" button cleared the problem up.
    Mystifying because the actual SQL query generated by the PL/SQL is valid (we've got a nightly testing job that pulls the PL/SQL function calls out of the AppEx metadata tables, executes them to get back the SQL and then validates the SQL).
    Turns out this problem looks to be a result of columns changing in the actual SQL itself, and hence not matching up to the Region Attributes (column names, one assumes) that AppEx knows about. Simply clicking Apply Changes causes AppEx to validate the returned query and then it adjusts the column attributes (one assumes) so that things match up.
    So - the $64,000 question(s):
    1) Are there any cool AppEx APIs to be able to try and detect this situation? Given an app of middling complexity (50-100 pages, each with various queries/reports), this is not an attractive issue to deal with manually.
    2) Any cool AppEx APIs to fix, or auto-sync these situations? (Essentially programmatically calling the "Apply Changes" button if you will).
    At a minimum, it would be great if AppEx could be updated to put out some kind of more informative error message when this occurs - maybe something along the lines of "Region Attributes Do Not Match Data Returned from Query", or something like that at least.
    Thanks for any input/ideas,
    Jim C.

    Thanks to all for your prompt responses.
    Vikas actually did me the favor of pretty much clarifying my info for me (tks Vikas). Yes, to all the above. It's PL/SQL code generating a SQL query, so 1 is (a); we want to use query-specific columns so it is (2a). And yes, the whole problem is that the something does change to cause the SELECT statement column list to change...nature of the beast, so "don't do that" doesn't really help here.
    Scott - sorry, should have been more explicit. Basically, we have a PL/SQL function behind a report that returns a SQL statement for the report. If that PL/SQL code changes to add a new column to the report (without going to the corresponding Report Attributes page and clicking the "Apply Changes" button to get AppEx to revalidate the query), then you wind up with this "no data found" error msg, which doesn't exactly point you to the root of the problem.
    It seems as though the "parse at compile-time" is really what's going on here. There must be some kind of "run-time" check going on as well, that is resulting in the "no data found" message. Seems as though it ought to be fairly straightforward to add some kind of check at run-time to handle that exception a little cleaner. Is there an official process to register a "Request for Process Enhancement" for AppEx to do this?
    In the meantime, thank you Vikas for the pointer to the APEX_APPLICATION_PAGE_RPT_COLS view - that looks like it will do the trick nicely. Given that, we can now add logic to our nightly "app tester" job that can compare what columns AppEx expects to find in a given report (for a given page) with the actual SQL (coming back from the PL/SQL function call) to essentially "validate" the AppEx meta data and at least let us know when these things get out of sync.
    BTW - if anyone would be interested in the actual contents of that "app tester" logic, I'd be happy to post it (someplace...here? Studio site?). It's basically just a PL/SQL block of code that currently runs in cron that just validates any SQL embedded in our app. (I suppose it is a little "hard-coded" since it does use our naming conventions for packages/functions to parse the PL/SQL calls from the Meta Data but it might still serve as a usefull starting point...) Since our AppEx app(s) sit on top of a database schema that is in fairly constant flux, we need the ability to know when somebody has changed something in the schema that needs to be accounted for in AppEx. The job primarily just parses the AppEx meta data to find PL/SQL function calls that return SQL, executes that PL/SQL to get the generated SQL, then just validates that SQL and reports back any invalid SQL calls. Perhaps we're in some unusual development environment (15-20 people working on a database schema with 700-800 tables/views) but it seems as though it would be fairly easy, for anybody using PL/SQL to generate SQL (which is a GREAT and powerful thing, by the way - thanks to whoever thought that up in AppEx land) to run into this issue.
    Jim C.

  • SQL Report not showing data - available in SQL Workshop and SQL Developer

    I am having an issue with developing a SQL Report in APEX 3.2.1. I run the code in both SQL developer and SQL Workshop and I get data pulled back (both against my development environment). When I run the same code in a SQL Report region, it returns no data available. Does anyone have any idea what would be causing this? Other regions on the page accessing different tables in the same schema return data without issue. Any help would be appreciated.
    Thanks
    Freddie

    Could you explain the last comment a bit more. Here is a bit more info just in case I touch on the info with it. The db schema is BPAMGR, the Workspace is BPAMGR. We use the same schema for all of our reporting. All of our tables are in the same schema. We don't use any tables outside of this schema. Our APEX workspace has been associated to only this schema. The tables are able to be queried by SQL Workshop in the same APEX instance that the report application is under.
    Freddie

  • Items is a region displayed after a sql report region!

    Hello everybody!
    I have 3 regions :
    1/ HTML text region with some items : sequence 10, column1
    2/ SQL report region : sequence 20, column1
    3/ HTML text region with some items : sequence 30, column1
    I have many problems and errors when submitting the page and saving data into tables, I think that htmldb is not getting the correct values corresponding to the correct items.
    If I change the column diplay of the sql report region to "2", or if I change the sequence of the SQL report region to 40, all is ok!!!
    (I am using wwv_flow.g_f10(i) to retreive data from the report).
    Any idea ?

    Hello Raju,
    Ok, My example is more complexe, but I have succed to reproduce the error in a sample example in my oracle htmldb workspace,
    My access info have bee sect to : [email protected]
    You will find the example in application 21275_TEST page 2.
    I have 3 regions, the second is a report sql region in witch I have a popkeyfrom query item.
    My submit button, update a table with a text field (item P2_IT, region1) and a date(item P2_MONTH ,region3).
    You will see that when submitting, you will get an error : not a valid month....
    I have not understand what is being done at save, but I am sure that the value of P2_MONTH is not correctly setted when updating the table!
    Just, changing the sequence of the report region from 10 to 30 resolve the problem,
    but I must have this region between the two others!!!
    Thanks for the help!

Maybe you are looking for

  • Do i have to back up.

    I bought my macbook last year june and i would like to upgrade to snow leopard. I would like to know if i have to back up all my files? Will everything be erased from my laptop?

  • SWF export positioning in web page

    Hi, I have some questions about the SWF version of the Indesign Files. I would like a bit more control on how it sits in a webpage if possible. If I export as normal, the SWF file sits in the top left side of the page. If I export and tick the box to

  • Http response to SOAP

    Hi all. Im sending a Soap Request to my Webservice, then the webservice executes a httpclient post and receives an response. This response is basically a XML file lwich i retrive as a string as shown p.println(filePost.getResponseBodyAsString()); and

  • How can i open Mac formatted zip drive files on my pc

    i have been given some zip drive discs which have been Mac formatted...how do i open these on a pc...is there any software i can install on my pc to read these formatted zip drive discs??

  • Data error through rs232 in cRIO 9074

    In the project being developed we have a pair of motor drivers which use ascii codes from the parallel port. The drivers where cobtrolled with a palm that broke down recently. So we started programming the software with labview, the program works wit