How to implement PL/SQL expression in Report conditonal?

Hi All,
In my application i am want use Pl/SQl as expression in Conditional Display for Report region. Can you please suggest me how to handle using PL/SQl expression in conditonal.
Thanks,
Anoo..

In general terms, your PL/SQL expression should evaluate to true or false - true will display the region, false will hide it. It's analogous to writing the conditional expression part of an if statement.
So, if you had normal PL/SQL code that looks like this:
if :P999_MYPAGEITEM is null or :P999_MYPAGEITEM = 0 then
end if;The equivalent conditional pl/sql expression would simply be:
   :P999_MYPAGEITEM is null or :P999_MYPAGEITEM = 0 Note: this is NOT the same as you would do for "PL/SQL body returning boolean Expression", which looks more like:
   return :P999_MYPAGEITEM is null or :P999_MYPAGEITEM = 0;or
declare
   bl_retval boolean;
begin
   bl_retval := :P999_MYPAGEITEM is null or :P999_MYPAGEITEM = 0;
   return bl_retval;
end;

Similar Messages

  • SQL Expression in Filter conditon Error in OBIEE 10g

    Hi
    I am getting an error while giving the sql in the sql expression in filter conditon.
    The sql expression I am giving is:SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"'
    Error:
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetLevelDrillability('set variable disable_cache_hit=1; SELECT "Task"."Task Name" saw_0, "Task Runs"."Time in Seconds" saw_1, TOPN("Task Runs"."Time in Seconds", 10) saw_2, "Task Runs"."Start Time" saw_3 FROM "Analysis" WHERE "Task Runs"."Start Time" >= SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"')}
    But when I individualy select start time column and check max of it the data comes fine, but if I am giving in sql expression it errors out.
    Please suggest.

    Hi Sini,
    I have tried taking the second suggestion but I get no result for that
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    Here I did not understand the code Task Runs"."Start Time" by "Task"."Task Name". If possible elaborate.
    And 1st suggestion the query formed just looks the query u suggested.
    Unable to figure out what exactly is the problem.
    Try something as in with 2 queries
    http://www.cool-bi.com/Tweaks/JoinsinAnswers.php
    or else
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    not sure how it works but this is other way of your sql in BI

  • How to implement dynamic sql in owb

    Hi everybody,
    I am new to OWB and hence i want to know how i can implement the following dynamic sql statement in owb...
    Declare
    Cursor C_tab_col is
    Select cat from tbl_cat_edesc_1 ;
    Vcat varchar2(240);
    Cursor C_edesc_col is
    Select edesc from tbl_cat_edesc_1 ;
    Vedesc varchar2(240);
    V_Command varchar2(30000);
    Begin
    Open C_Tab_col;
    Fetch C_tab_col into vcat;
    Open C_edesc_col;
    Fetch C_edesc_col into vedesc;
    loop
    V_Command := 'update upd_catseg_1 c set c.'||vcat||'=';
    V_Command := V_Command||'(select d.sales from TEST_catseg d' ;
    V_Command := V_Command||' where edesc = '||''''||vedesc||''''||' and c.cardno=d.cardno)';
    dbms_output.put_line('10 '||V_command);
    Execute immediate v_command;
    Fetch C_tab_col into vcat;
    Exit when c_tab_col%notfound;
    Fetch C_edesc_col into vedesc;
    Exit when c_edesc_col%notfound;
    end loop;
    commit;
    end;
    Thanks a many

    Hi,
    first i have created a procedure witht he following code in the code editor...
    BEGIN
    Declare
    Cursor C_brand_col is
    Select cat from TBL_CAT_EDESC_BRAND ;
    Vbrand varchar2(240);
    Cursor C_bredesc_col is
    Select EDESC_BRAND from TBL_CAT_EDESC_BRAND;
    Vbredesc varchar2(240);
    V_Command varchar2(30000);
    Begin
    Open C_brand_col;
    Fetch C_brand_col into vbrand;
    Open C_bredesc_col;
    Fetch C_bredesc_col into vbredesc;
    loop
    V_Command := 'update sav_fc_sa_pc c set c.'||vbrand||'=';
    V_Command := V_Command||'(select d.fc_brands_sa from TEST_brand d' ;
    V_Command := V_Command||' where d.brand_edesc = '||''''||vbredesc||''''||' and c.cardno=d.cardno)';
    dbms_output.put_line('10 '||V_command);
    Execute immediate v_command;
    Fetch C_brand_col into vbrand;
    Exit when c_brand_col%notfound;
    Fetch C_bredesc_col into vbredesc;
    Exit when c_bredesc_col%notfound;
    end loop;
    commit;
    end;
    END;
    then i validate it and deply it..
    after that i create a mapping and in that mapping i first import the table TBL_CAT_EDESC_BRAND and drag and drop it into the mapping and again the i put the procedure into a transformation operator and connect the inoutgrp of the table to the transformation operator ingrp deploy it and run it...this is taking a lot of time .... so i am not sure whether i am doing the right thing...for this dynamic sql i dont need to pass any parameters. can i juz execute this procedure or should i create a mapping ???? i am totally confused... could you please help me.....how to proceed........
    if i juz execute the dynamic sql it takes only 5 min in sql but i am not sure how ti implement it in owb... can you please help...
    Thanks a many

  • How to view the sql behind a report.

    Hi All,
    i am using OBIEE 10.1.3.4.1. while running a report its showing no result. There is something wrong with the join I guess. But still I need to see the sql it generates.
    In NQQuery.log its not updating the sql that I am running a report in answer. How Can I view the detail sql behind the report? Is any more settings to do for view the SQl...
    Thanks in advance,
    Deepak.

    Hi Deepak,
    go to Settings > Administration > Manage Sessions from front end..
    You'll find view log option related to the report you run..
    Make sure that you've set loglevel greater than equals to 2 for the logged in user(in rpd level)

  • How to implement Dynamic SQL in DataService ??

    Hi,
    Is there any way in ALDSP to implement Dynamic SQL in Dataservice ?
    My scenario is "based on set of optional fields i need to join different tables.If the optional field is not there then i don't have to join with the corresponding table."
    Thanks

    Ah yes, I thought that looked familiar. It's same question from July 12.
    There is no way to generate Dynamic SQL in DSP XQuery. There is one query plan for each query. The query plan does not change based on the inputs.
    Using a FilterXQuery on top of a query actually generates a new query. You can play with that if you like, but it is not particularly suited to changing joins. Go with the ad hoc query.

  • Multiple pl/sql expressions for a conditonal process

    Can I put multiple pl/sql expressions in the expression one box? I want run a process on conditions that posts an update when the user has checked a box that was not previously checked.
    looks something like this:
    when
    (p1_checkbox1 = 'Y' or p1_checkbox2 = 'Y')
    and ((p1_checkbox1 =! p1_checkbox1_sav)
    or (p1_checkbox2 =! p1_checkbox2_sav))
    Is this possible or will I need to create multiple processes that do the same thing with different run conditions?

    Please tell us your first name and update your forum profile with it to help us. Thanks.
    The answer is no, you can only have one expression, for example:
    (:p1_checkbox1 = 'Y' or :p1_checkbox2 = 'Y')
      and ((:p1_checkbox1 =! :p1_checkbox1_sav)
      or (:p1_checkbox2 =! :p1_checkbox2_sav))Scott

  • SQL Express Edition, Reporting Services Role SCCM 2012

    hi,
    Question: Can I Use SQL Server 2012 Express Edition to configure Reporting Services Role on SCCM 2012 ?
    Thanks,

    Edition of Reporting Services
    Valid edition of SQL Server
    Standard
    Standard, Enterprise
    Enterprise
    Standard, Enterprise
    Developer
    Standard, Enterprise, Developer
    Evaluation
    Standard, Enterprise, Developer, Evaluation
    John Marcum | http://myitforum.com/myitforumwp/author/johnmarcum/

  • How to change the SQL-Query in (Report in ReportViewer) by running Java App

    Hello,
    Ich have an App which generates dynamicly SQL-Queries. By pressing a button it should generate a report with this generated Query.
    I´m using the ReportViewer.jar. Further is it possilbe to a extra parameters form app which are not in a DB?

    <p>There are a few ways that you can achieve this. If your SQL Queries have their filters modified (ie. WHERE clause) then this can be easily solved by adding report parameters to the Report filter. Search the in-product help for "Record Filter" and you should get a number of helpful resources returned.</p><p>Additionally, you can pass in java.sql.ResultSet objects with a populated recordset of the data you want to show in the report. We don&#39;t currently provide any tools to assist the creation of the code stubs for thick-client applications (like we do for JSP pages) however you can download a collection of thick-client sample code from here:</p><p><a href="http://support.businessobjects.com/communityCS/FilesAndUpdates/crxi_r2_jrc_desktop_samples.zip">http://support.businessobjects.com/communityCS/FilesAndUpdates/crxi_r2_jrc_desktop_samples.zip</a> </p><p>As I mentioned, this sample contains a collection of code snippets. The one in particular you will be interested in is titled "JRCResultsetDatasource". Hopefully, this will provide you with a few options. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

  • How to extract embedded SQL from crystal reports 8.5

    I have a report created in version 8.5 with data source as crystal query (.qry) published on Crystal enterprise server.
    I have lost Qry file but the report is running by executing the embedded SQL. Is there any option where I can extract the SQL statement that is embedded in the report file.

    Hi,
    Go to 'Database' menu
    select 'Database Expert....' submenu
    It'll open 'Database Expert window. On right side of this window it shows 'Selected tables'. Under that it shows databsae name and the query used. Right click one it and you should see
    Edit,
    View, and
    Add to Repository options.
    Hope this will help.

  • SQL expression in the report title

    How can I add SQL expression in the title or in narrative text.
    For example I want to say:
    "Sales Report for Categories: ?X? (for dates ?Y1? - ?Y2?)"
    where ?X?, ?Y1? and ?Y2? are result of SQL statements:
    I can query ?X?: 'select category_name from category_table where date > current_date -7'
    ?Y1? 'select (current_date - 7) from dual'
    ?Y2? 'select current_date from dual'
    Thanks

    Hi,
    No need to craete any presentation variable if its CURRENT_DATE-7 and CURRENT_DATE
    Just pull two columns and change fx of those two columns to CURRENT_DATE-7 and CURRENT_DATE
    Add narrative view instead of title view and in narrative give @n and @m where n and m are positions of columns from left starting from 1.(if columns are at 2 and 3 position then @2 and @3).Give rows to display as 1.You can even add some html tags to get color code,bold etc to narrative view.
    Dont forget to hide the columns that you pulled.
    Regards,
    Srikanth
    Edited by: Srikanth Mandadi on Oct 10, 2010 8:43 AM

  • How to change sql expression of SQL-Calculated Attribute of view object ?

    Hi
    jdev 11.1.1.5
    I have a view object with a SQL-Calculated Attribute (sumAnalytic) how can I change sql expression of this attribute in runtime?
    for example in application module method??

    Hi Mr Timo
    Thanks for your reply but I do not need dynamic vo because I can not change all of my vo
    I only need to change expression of SQL-Calculated Attribute of view object in run time.
    For this I set expression in view object something like this 'select 2 from dual' and in run time in my AM method I get the vo query and replace 'select 2 from dual' with something like 'selet sum(amnt) over (partition by 1)' and set new query.
    But I think the better solution must exist
    Thanks

  • From localdb to sql express in VS 2014

    I'm trying to update an ASP.NET Web Forms application (not written by me) from .NET 3/SQL 2005 to .NET 4.5/SQL 2014. I'm running VS 2014 on Windows 8.1.
    Originally, I set the project development environment up to use IISExpress and LocalDB, but I couldn't get that running. After several days poking around the forums and application.config, I couldn't find anything that addressed my issues, so I decided to
    install IIS. I changed the project Web properties to target the local IIS Server, I immediately got the message "This project uses SQL Server LocalDB. Microsoft recommends that you use SQL Server Express with IIS."
    Okay, I can handle that. I installed SQL Server 2014 Express (eventually...the download link in the dialog is incorrect), attached the database to the server, and changed the connection string in web.config to
             Data Source=ZEUS\SQLEXPRESS;Initial Catalog=TMS;Integrated Security=True
    So far, so still not working...I'm still getting that <insert swear word here> message about LocalDB. I've cleaned the solution, re-started my machine...nothing changes.
    I can find lots of stuff about how to upgrade from SQL Express to LocalDB, and a blog or two about how to deploy LocalDB (but the instructions seem out of date). NOTHING on how to go the other way.
    Anybody have any ideas? I'm going nuts here...worse, going broke, because I can't bill my time until I resolve this, so assistance will earn undying gratitude...
    Rebecca M. Riordan

    Might try them over here.
    Microsoft Visual Studio and Visual Web Developer Express forum on ASP.Net
    Microsoft SQL Server, SQL Server Express, and SQL Compact Edition forum on ASP.Net
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to implement this complex logic on rpd

    How to implement following sql logic on OBIEE 10g RPD...whole thing to be implemented as single column on presentation layer.
    to calculate numerator===
    select sum(flag) as ap_account_no,exp from                                                                                           
    (select a.invoice_id as invid,a.payment_no, max(a.payment_dt) as payment_dt,max(a.due_dt) as due_dt,b.expenditure_type as exp,                                                                                          
    case when max(a.due_dt)+ 3 > max(a.payment_dt)                                                                                           
    then 1                                                                                           
    else 0                                                                                           
    end As Flag                                                                                          
    from Supplier_inv_pymt_map a, po_invoice_map b                                                                                          
    where a.invoice_id= b.invoice_id and a.invoice_dt!=a.due_dt and a.usd_gross_AMOUNT >0 and a.PAYMENT_STATUS!='VOIDED' and to_char(a.payment_dt,'MON-YYYY')='JUN-2011'                                                                                          
    group by a.invoice_id, a.payment_no,b.expenditure_type) GROUP BY exp                                                                                          
    to calculate denominator===
    select count(invid),exp from                                                                                      
    (select a.invoice_id as invid,a.payment_no, max(a.payment_dt) as payment_dt,max(a.due_dt) as due_dt, b.expenditure_type as exp                                                                                     
    from Supplier_inv_pymt_map a, po_invoice_map b                                                                                     
    where a.invoice_id= b.invoice_id and a.invoice_dt!=a.due_dt and a.usd_gross_AMOUNT >0 and a.PAYMENT_STATUS!='VOIDED' and to_char(a.payment_dt,'MON-YYYY')='JUN-2011'                                                                                     
    group by a.invoice_id, a.payment_no,b.expenditure_type) GROUP BY exp                                                                                     
    tables n column used in sql r available on physical layer....
    can anyone help

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • PL/SQL Expression of button

    HI, please help me
    how to create PL/SQL expression of button to redirect to another page in the application on Oracle 10 g
    in PL/SQL i create this code but can not continue
    BEGIN
    select password from user where user_name='john';
    if password='123' then
    in the above page must be redirected to another page
    end if;
    END;
    Edited by: 912303 on Apr 6, 2012 9:47 AM

    Is this query the 1st thing you do on the current page?
    If so, then one way to do that would be to create a Before Header Branch to redirect to the target page and make the branch condition EXISTS
    and enter the query
    Select NULL
    From user_table
    Where user = 'John' and password = '123'

  • How to implement system monitoring(IT performance rep) in Solution Manager.

    Hi
    1.How to implement system monitoring(IT performance report) in Solution Manager?
    need to Monitroing *SAP Workload Areas -Total Database time,Total Avg. Response Time,ect..
    &SAP Operation System Areas -CPU Utilization* in SM workcenter is it possible?
    Please let me know how to configure ?
    2. Is it possible to monitor Solman system itself to get system monitoring--this is to test?
    regards
    Neni

    1.How to implement system monitoring(IT performance report) in Solution Manager?
    need to Monitroing *SAP Workload Areas -Total Database time,Total Avg. Response Time,ect..
    &SAP Operation System Areas -CPU Utilization* in SM workcenter is it possible?
    Please let me know how to configure ?
    Pls visit the roadmap of solution manager EHP1 -Operation with Solution manager
    you get many pdf and sim files for the same.
    https://websmp110.sap-ag.de/~sapidb/011000358700006940692005E.sim
    2. Is it possible to monitor Solman system itself to get system monitoring--this is to test?
    Yes it is possible
    visit the above section
    Hope solves prb
    Regards
    Prakhar

Maybe you are looking for

  • Starting problems

    I have a satelite L300 series laptop and i am having a problem starting it. It comes on and its says to launch the repair (recommended)  or start normally which ever one i choose it goes to launch the repair and after an hour or so its comes with thi

  • ITunes library file corrupt after updating?

    Just the other day I updated to the latest iTunes software. This is the first time I've tried to use it and it keeps freezing (the swirly rainbow icon) until I eventually have to give up and force quit. My iTunes library is on an external hard drive

  • Fail to mount

    for the past few days, I have been in search of a faster/easier bittorrent client than azureus. I had had some difficulty with it and downloaded something else. since that time when I try and download a new client, or even reinstall azureus: 1. I don

  • Process Order Settlement Rule by Order Type

    Hi Experts Our Client  a requirement to have Process Order Settlement by Order Type please let me know how it can be achieved In SAP  a Process Order Variance is settled via the following Combination in OBYC  :- 1 Chart of Accounts 2 Transaction PRD

  • Using fax viewer to open a jpeg image embedded as a link.

    Hi, In my application, I have a functionality for uploading scanned document which are in jpeg/bmp format. The user can later on see/print these documents. I am using <a target="_blank" href="">to open the document, so a new window(in case of interne