Timestamp coming in report with evaluate function

Hi All,
I have one date prompt where i have defined the presentation variable pvar_strt_dt.
Now i am running report which captures the value of pvar_strt_dt
but i m getting following error as follows
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1843, message: ORA-01843: not a valid month at OCI call OCIStmtFetch. [nQSError: 17012] Bulk fetch failed. (HY000)
SQL Issued: SELECT EVALUATE('TO_DATE(%1,%2)', '2011-02-21 00:00:00','mm/dd/yyyy hh:mi:ss') saw_0, Time.Date saw_1
I m using this in my formula of the report.....EVALUATE('TO_DATE(%1,%2)', '@{pvar_strt_dt}','mm/dd/yyyy hh:mi:ss')
Any help in this regard.

EVALUATE('TO_DATE(%1,%2)', '@{pvar_strt_dt}','mm/dd/yyyy hh:mi:ss')When you use to to_date function it defaults to dd/mm/yy not what you have specified,Insead use to_char if you want to specify the format you wish too.Check even the syntax
hope helps you.
Cheers,
KK

Similar Messages

  • Sort order issue in with Evaluate function ( Next Quarter measure)

    Hi All,
    I have report requirement where I have to show measures for a particular geography for previous, current and next quarters in a pivotal view.
    ---------------Previous Quarter| Current Quarter|     Next Quarter
    Geography               
    ABC|xx|xx|xx
    PQR|xx|xx|xx
    XYZ|xx|xx|xx
    Next quarter values are displayed for other geography like
    ABC value is shown for XYZ and XYZ value is shown for PQR
    I have derived measure for pervious quarter using Time Series Function > Ago function,
    However the problem is with next quarter. I used following Evaluate Function to derive measure for next quarter.
    EVALUATE ('LEAD(%1,1) over (order by %2)' AS DOUBLE PRECISION , X, Y)
    Here X = Measure and Y = Level (Quarter)
    X is delta of two other measures A and B.
    X = (A- B)
    Thanks,
    SMA

    Hi user10300020,
    That's a fairly common problem with months that happens regardless of database source.
    In the logical layer of OBIEE you can specify the sort order on the month name column. Just double click on the month name column and look for the option to set sort order based on a different column. I typically sort the month name based on the month number.
    Give that a shot and tell me if it works.
    -Joe

  • List View Report with pipelined function in Mobile application and ORA-01007: variable not in select list

    Hi!
    I have a problem with List View Report in mobile application (theme 50 in apex) after updating to apex 4.2.2. I created Report -> List View. I used select from pipelined function in Region Source. Then when page is running and submited three times (or refreshed three times) I get an error:
    Error during rendering of region "LIST VIEW".
    ORA-01007: variable not in select list
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -1007
    ora_sqlerrm: ORA-01007: variable not in select list
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 21230833903737364557
    component.name: LIST VIEW
    error_backtrace:
         ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 4613
         ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 3220
    I get this error only when I use select from pipelined function in Region Source (for example: "select value1, value2 from table(some_pipelined_function(param1, param2)) ").
    You can check it on http://apex.oracle.com/pls/apex/f?p=50591 (login - demo, password - demo).
    In this application:
    - I created package TAB_TYPES_PKG:
    create or replace PACKAGE TAB_TYPES_PKG IS
    TYPE cur_rest_r IS RECORD (
        STR_NAME          VARCHAR2(128),
        INFO              VARCHAR2(128)
    TYPE cur_rest_t IS TABLE OF cur_rest_r;
    END TAB_TYPES_PKG;
    - I created pipelined function TEST_FUNC:
    create or replace
    FUNCTION TEST_FUNC
    RETURN TAB_TYPES_PKG.cur_rest_t  PIPELINED IS
    r_cur_rest TAB_TYPES_PKG.cur_rest_r;
    BEGIN
    r_cur_rest.STR_NAME := 'ROW 1';
    r_cur_rest.INFO := '10';
    PIPE ROW (r_cur_rest);
    r_cur_rest.STR_NAME := 'ROW 2';
    r_cur_rest.INFO := '20';
    PIPE ROW (r_cur_rest);
    r_cur_rest.STR_NAME := 'ROW 3';
    r_cur_rest.INFO := '30';
    PIPE ROW (r_cur_rest);
    r_cur_rest.STR_NAME := 'ROW 4';
    r_cur_rest.INFO := '40';
    PIPE ROW (r_cur_rest);
    r_cur_rest.STR_NAME := 'ROW 5';
    r_cur_rest.INFO := '50';
    PIPE ROW (r_cur_rest);
    RETURN;
    END TEST_FUNC;
    - I created List View Report on Page 1:
    Region Source:
    SELECT str_name,
           info
    FROM TABLE (TEST_FUNC)
    We can see error ORA-01007 after refresing (or submiting) Page 1 three times or more.
    How to fix it?

    Hi all
    I'm experiencing the same issue.  Predictably on every third refresh I receive:
    Error
    Error during rendering of region "Results".
    ORA-01007: variable not in select list
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -1007
    ora_sqlerrm: ORA-01007: variable not in select list
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 6910805644140264
    component.name: Results
    error_backtrace: ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 4613 ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 3220
    OK
    I am running Application Express 4.2.2.00.11 on GlassFish 4 using Apex Listener 2.0.3.221.10.13.
    Please note: this works perfectly using a classic report in my desktop application; however, no joy on the mobile side with a list view.  I will use a classic report in the interim.
    My region source is as follows:
    SELECT description AS "DESCRIPTION", reference AS "REFERENCE" FROM TABLE(AUTOCOMPLETE_LIST_VIEW_FNC('RESULTS'))
    The procedure:
      FUNCTION AUTOCOMPLETE_LIST_VIEW_FNC(
          p_collection_name IN VARCHAR2)
        RETURN list_row_table_type
      AS
        v_tab list_row_table_type := list_row_table_type();
      BEGIN
        DECLARE
          jsonarray json_list;
          jsonobj json;
          json_clob CLOB;
        BEGIN
          SELECT clob001
          INTO json_clob
          FROM apex_collections
          WHERE collection_name = p_collection_name;
          jsonobj              := json(json_clob);
          jsonarray            := json_ext.get_json_list(jsonobj, 'predictions');
          FOR i IN 1..jsonArray.count
          LOOP
            jsonobj := json(jsonArray.get(i));
            v_tab.extend;
            v_tab(v_tab.LAST) := list_row_type(json_ext.get_string(jsonobj, 'description'), json_ext.get_string(jsonobj, 'reference'));
          END LOOP;
          RETURN(v_tab);
        END;  
      END AUTOCOMPLETE_LIST_VIEW_FNC;
    Thanks!
    Tim

  • Answers Reports with Aggregate Function

    Hi,
    I have a Product Table with columns, CustomerName, ProductID,ProductName,Purchase Date. I am trying to create a report in the flg. format:
    CustomerName Customer-Prod Count ProductName Total Prod Count %of Products
    Mike 10 CD 2 20%
    DVD 1 10%
    Computer 6 60%
    Laptop 1 10%
    Dan 5 Computer 3 60%
    DVD 2 40%
    Any suggestions on how to accomplish this?
    Thanks,
    rkingmdu

    Thanks, the syntax worked. But I get incorrect results.
    Here's what I queried:
    "PRODUCTS".CUSTOMERNAME,
    COUNT("PRODUCTS"."PRODUCTID" By "PRODUCTS"."CUSTOMERNAME"),
    "PRODUCTS".PRODUCTNAME,
    COUNT("PRODUCTS"."PRODUCTID" By "PRODUCTS"."PRODUCTID", "PRODUCTS"."CUSTOMERNAME")
    The first count returns the correct results but the second count is wrong. The query looks to be ok, I don't know where I am getting it wrong.
    Any ideas?
    Thanks
    rkingmdu

  • Reports with all functionality (sorting,total,subtotal,download)

    Hi,
    We require that all the actions which we can perform on the Reports available in SAP environment should also be available in the EP Platform.
    Eg
           sorting,total,subtotal,download.
    Thanks.

    Hi,
    We require that all the actions which we can perform on the Reports available in SAP environment should also be available in the EP Platform.
    Eg
           sorting,total,subtotal,download.
    Thanks.

  • OBIEE 11g EVALUATE function working fine with Administrator but

    Hi,
    We have a report with EVALUATE function , which is working fine with Administrator User but when we run for other users its giving following error.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42015] Cannot function ship the following expression: Evaluate( COUNT(%1) OVER (PARTITION BY (%2)),D901.c1, D901.c2) .Please have your System Administrator look at the log for more details on this error. (HY000)
    Is there any parameters that we have to set for the user level to use Evaluate ?
    Thanks,
    Raj

    You can create a compound key of Cat + SubCat (concatenation in a logical column is a quick win) which will render the SubCats unique and assign that as the logical level key:
    SubCat:
    A-Basic
    A-Value Add
    A-High
    B-Basic

  • Report pl/sql function body returning query bind variable

    I really like using report with a function returning sql. I have been using something like this
    declare
    q varchar2(10000);
    begin
    q := 'select col1
    from mytable
    .... add a dynamic where clause ....
    return q;
    end;
    But I thought it would be nice to store the query in a bind variable so that I could show the where clause. I tried to create an item P123_Q and do the following:
    declare
    q varchar2(10000);
    begin
    q := 'select col1
    from mytable
    .... add a dynamic where clause ....
    :P123_Q := q;
    return q;
    end;
    But the parser treats :P123_Q as if it is a bind variable within flow 4000. I found a workaround but I'm wondering if there is a better way.
    My workaround is to set a preference in the query and then use a computation that sets P123_Q to the value of the preference:
    declare
    q varchar2(10000);
    begin
    q := 'select col1
    from mytable
    .... add a dynamic where clause l_q := l_q || ....
    HTMLDB_UTIL.SET_PREFERENCE(
    p_preference => 'Q',
    p_value => q,
    p_user => :APP_USER);;
    return q;
    end;
    Any thoughts on another way?
    thanks,
    Anton

    Anton,if htmldb_application.get_current_flow_sgid(:APP_ID) = htmldb_application.get_sgid then
      :P1_X := l_sql;
    end if;Scott

  • Evaluate function problem

    I have a problem with EVALUATE function in OBIEE.
    I passed two parameters. Number is numeric and Name is varchar.
    Evaluate('DWH.PKG_ITEM_FUNCTION.PS_LAW(%1,%2)', "Book"."Item"."Number", "Book"."Item"."Name" )
    I get the following error:
    [nQSError: 22027] Union of non-compatible types.
    How can I solve this?
    Many thanks in advance.

    hi stanisa,
    It is a bug in 10g,here it goes
    --> While using Evaluate function, common errors like “Union of non-compatible types. (HY000)”.
    I believe this is a bug in the Evaluate function implementation. One must cast all the arguments to the same data type before passing them as arguments.
    Courtesy :- http://oraclebizint.wordpress.com/2007/10/18/oracle-bi-ee-101332-top-10-common-errors/
    hope helps you.
    Cheers,
    KK

  • CR XI R1: viewer can't open report with UFL from COM dll

    Hello all!
    I faced the following problem: report which is uses functions from COM dll doesn't works on customer's pc. CRViewer throws exception when calling ViewReport() method. GetLastError() gives just 0 ...
    All other reports without functions from COM DLL are working on that PC however. Moreover, reports which uses function from non-COM DLL are also working.
    Versions & environment:
    - Report file is designed in CR11, CR Developer; Product type: Full, Product Version: 11.0.0.895
    - Runtime files on customers pc installed by .msi created from merge modules for Crystal Reports XI RDC Deployments (latest available SP4 for CR XI R1: [crxi_rdc_merge_modules.zip|http://resources.businessobjects.com/support/communityCS/FilesAndUpdates/crXI_rdc_merge_modules.zip], as listed on [this|http://resources.businessobjects.com/support/additional_downloads/runtime.asp] page)
    - target OS: WindowsXP SP3, all updates are installed
    - i'm using COM crviewer, but there are some points in application where report is opened using CRPE api - it is also crashing on reports with custom functions from COM DLL
    - UFL DLL is registered and loaded correctly (investigated by debug output), looks like crash occured during attemt to call function
    - just for test I tried to install CR Developer on customers PC: it successfully opens all "problem" reports, but the viewer in application still crashing ...
    I would appreciate any tips / suggestions. Please also let me know if I need to specify versions of other products / components.
    Thx,
    Andrew

    Sorry, but you have to define "viewer just crashed". To different people this means different things; error, viewer never shows up, application terminates, etc., etc., etc....
    If the issue is only 10% of computers then it is not
    Re. "...could be caused by:"
    - previous installation of CR8.5 (or earlier) runtime (how to cleanup it correctly?)
    possibly - see below
    - OS configuration (what we need to ajust?)
    probably not - as long as it's the same OS and SPs
    - something missing in our code (but why it works in 90% cases?)
    -no
    - something wrong with CRXI runtime (but we a using latest available MSMs, and again, this works in 90% ...)
    possibly see below.
    I would approach the issue by running [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] and comparing the dlls loading on a computer that works and one that "crashes"...
    Your second utility is [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx] but ProcMon creates large and difficult to read files.
    Oh, and get the powers that be to start to consider moving away from this legacy "stuff". Like I said, PE APIs have been gone since version 9 of CR and RDC has been retired in CR XI R2 (11.5). Neither product is supported anymore.
    - Ludek

  • Has anyone had a problem with TapMedia File Manage on iPhone 5. I reported a WIFI functionality problem to the developer and asked for support. Instead they have been very unprofessional by name calling me instead of logically evaluate and troubleshoot th

    Has anyone had a problem with TapMedia File Manage installed on iPhone 5? I reported a WIFI functionality problem to the developer and asked for support. Instead the company has been very unprofessional by name calling me instead of logically evaluate and troubleshoot the problem

    Hi AKE1919,
    Welcome to the Support Communities!
    The following information should help you with this:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/HT1933?viewlocale=en_US
    Cheers,
    Judy

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Discoverer report with parameters and functions

    I am new to Discoverer. Is there a way to create a report (with parameters) of one line per customer such that the following data will be displayed for each customer?
    Among the parameters is: from_date (month & year) ,to_date
    The basic query gives totals for each date (month & year) for every customer.
    Among the fields displayed:
    1-customer_id,
    2-balance until from_date,
    3-total activity between from_date and to_date
    I have a function to calculate the total balance until from_date, but then I cannot get the total activity on the same line. I tried using another function and I tried using a total calculation but to no success.
    Is this possible?
    Thanks.

    Hi Markus
    You need to determine whether you can in fact call a Discoverer report using a URL before linking it in Portal. You need to run the report in Viewer first and then see copy the URL from the address line of the browser. Then you open another browser and paste the URL. You may well be prompted for a username and password but hopefully the correct report with the right parameters will then execute.
    Assuming this works you then paste the same URL link into Portal and you should be able to get the report to run.
    Best wishes
    Michael

  • SSRS report with tabular model – MDX query CoalesceEmpty function does not return the provided string value

    Hello everyone,
    I created following calculated member in MDX query. I am using it in one of the report parameter in dataset (single select dropdown list as report parameter).
    WITH MEMBER [Measures].[ParameterCaption] AS
    CoalesceEmpty([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION,'None')
    I would like to display 'None' text at the top of the dropdown list values. So that when user selects 'None' then this parameter will not considered in MDX query else the selected National Account Code will be considered to filter report data. But,
    the above return blank/empty value for  [Customer].[National Account Code].&  member though I specified 'None' as text in CoalesceEmpty function. Any advice would be appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi Ankit,
    It seems that you issue had been solved in your another thread.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a5becac-226f-428a-95b0-aaaa22733818/ssrs-report-with-tabular-model-create-a-dropdown-report-parameter-with-none-option-as-the-top?forum=sqlanalysisservices#0e51bf8c-a66c-4df5-a244-0147728fdfdb
    iif([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION="","None",[Customer].[National
    Account Code].CURRENTMEMBER.MEMBER_CAPTION)
    I marked this reply as answer, it will benefit to other members who have the similar issue.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Creating Report using EPM Functions with Dynamic Filters

    Hi All,
    I am new to BPC, In BPC 7.5 i seen like we can generate EPM report using EVDRE function very quickly and easy too. Is the same feature is existing in BPC 10.0 ? if no how can we create EPM reports using EPM Functions with Dynamic Filters on the Members of the dimension like in BPC 7.5.
    And i searched in SDN, there is no suitable blogs or documents which are related to generation of Reports using EPM Functions. All are described just in simple syntax way. It is not going to be understand for the beginners.
    Would you please specify in detail step by step.
    Thanks in Advance.
    Siva Nagaraju

    Siva,
    These functions are not used to create reports per se but rather assist in building reports. For ex, you want to make use of certain property to derive any of the dimension members in one of your axes, you will use EPMMemberProperty. Similary, if you want to override members in any axis, you will make use of EPMDimensionOverride.
    Also, EvDRE is not replacement of EPM functions. Rather, you simply create reports using report editor (drag and drop) and then make use of EPM functions to build your report. Forget EvDRE for now.
    You can protect your report to not allow users to have that Edit Report enabled for them.
    As Vadim rightly pointed out, start building some reports and then ask specific questions.
    Hope it clears your doubts.

  • A report with functionality

    Hello all, I need to create a report with an additional column named "Remove" so that each record in the report has a check box beside it. In addition to the check boxes, there is a submit button at the end of the report for submission. The goal is to remove all those records with marked check boxes when user clicks on the submit button. I have searched through the forum, and I did not find anything like this. Hence, I wonder is it possible to do the above? Thanks in advance.

    Hello, in the process of creating a report based on a SQL query,
    portal asks for the table/view this report would be built from.
    It means that table/view must have a table column to store
    checkboxes, right? How can I build a table/view with a checkbox
    column using sql? <INPUT TYPE= ....> is for forms. I know how
    to build it with a form, but I cannot understand how I can have
    a column of checkboxes in a report. I tried the following:
    select PID, FIRSTNAME, LASTNAME, DOB, STATUS, '<INPUT TYPE
    = "checkbox" NAME="PID" VALUE="PID">' as Remove from
    NYANG123.STUDENT_VIEW
    It returned me a string <INPUT TYPE = "checkbox" NAME="PID"
    VALUE="PID"> instead of a checkbox for each record. By the way,
    PID is a number/integer. Please clarify. Thanks again.
    Hi
    What you really need is a good book on JavaScript and HTML.
    I refer a lot to Danny Goodmans "JavaScript Bible".
    In a report based on a SQL query you need a column that selects:
    '<INPUT TYPE=checkbox NAME="'||TABLE.ID||'">'
    This will give you a checkbox in a column of your report.
    I think that the code to get the selected values is different for Netscape and IE.
    >
    now create a procedure to:
    htp.p() out an HTML FORM, and the JavaScript code to loop through all of the INPUT elements on the page and if they are
    CHECKED, put NAME and a ',' into the field to be submitted.
    then, if the field to be submitted has a value, submit the form.
    this procedure will also htp.p() out an INPUT type button to call the JavaScript function to submit the checked items.
    Thit procedure is run in the PL/SQL code to be run AFTER displaying the report.
    >
    You will obviously need the procedure that accepts the comma separated id numbers to exist on the database, otherwise the
    form will not work when it is submitted.
    >
    I hope that this helps
    Regards Michael

Maybe you are looking for

  • Custom File Renaming Template Keeps Changing

    I'm having issues when creating a custom file naming template in Tiger with LR 1.3.1. When importing files, I created a custom template to rename the files with YYMMDD_{original file suffix}{Master}.tif to get this: 071217_12056Master.tif. The first

  • [Oracle 8i] Need help pruning branches from a hierarchical query

    My problem is that my hierarchical query seems only to trim out the values that don't meet my criteria, but still includes their children. When my query hits a record that does not meet my criteria, I want it to stop there. I've tried including the c

  • How to create Presentation variable for columns and to use it in Narrative?

    Hi All, Anybody know how to create presentation variable for a column (i.e., i need to create it in edit formula section itself). And then, I should use it in Narrative section to display that column value. Is it possible? Or do i need to use any oth

  • Changing email address on iphone APPS page

    i recently changed my itunes email address. when i tried to update my apps on my iphone 3g, it brought up my former email address to log in with, which was unsuccessful, as i changed my email address?? any help??

  • Upload Photo's for Slideshow Transfer

    I have attempted (multiple times) to upload photos' in LR3 for a slideshow  and half way through I keep getting a server error message - any hints?? Message was edited by: mck05pcna