Interactive report - conditional where clause

Hello,
i have an interactive report like
SELECT a.id, a.my_column
FROM my_table a
WHERE a.id = 12
Now, when the user select a assigned value, the where clause don't be execute, also like this (without where)
SELECT a.id, a.my_column
FROM my_table a
The User is not allowed to see this column, also i can not use the filter-function of the interactive report.
Any Idea how did i make?
thank's, Daniel
Message was edited by:
DaKa

Hi Andy, this functionalitiy is clear.
I will manipulate the region source in fact of an interaction of a user.
Now, my select shows like:
SELECT a.* FROM v_test a
WHERE (:P40_ID = -1 OR a.id = :P40_ID)
:P40_ID is a select box with return-null-value of "-1".
This is not very fast. Therefore i search a method, when user select the null-value, then the select like:
SELECT a.* FROM v_test a;
and when user select another value then:
SELECT a.* FROM v_test a
WHERE a.id = :P40_ID;
All this without the "filter"-functionality of the IR!
Any idea?
Sorry for this misunderstood.
Daniel.

Similar Messages

  • Conditional where clauses in database adapter

    I am trying to write a query in a database adapter that allows for conditional where clauses. Specifically, I want to include or not include a where clause (and clause) if an input variable is empty or not. Can a prepared statement with lexical parameters be used in a database adapter? Or is there another way to do this?
    Thanks in advance.

    I am afraid that you can only bind parameters to the SQL, you can't bind the SQL itself to the SQL. We do have QueryByExample support, where based on what fields are set in an example object, it will construct a different SQL select.
    If you pass in
    <Address>
    <street/>
    <city>
    <state>CA</state>
    </Address>
    it will return all addresses in California. If you pass in:
    <Address>
    <street/>
    <city>Los Angeles</city>
    <state/>
    </Address>
    it will return all addresses in Los Angeles.
    Thanks
    Steve

  • Interactive report conditional display of link column - apex 4

    I create an interactive report
    select object_id,
           object_name,
           case
            when mod(rownum, 2) = 0
            then 'block'
            else 'none'
           end  display_link
    from user_objects
    where rownum <= 10in the Link Column for the report I selected one of the edit icons and put the following in the link attributes
    style="display:#DISPLAY_LINK#"I also edited the object_id and set the Column Link and selected an edit icon and put the same style in the link attributes.
    The link under the column displays correctly but the link for the report does not seem to substitute the #DISPLAY_LINK# from the report. Any Ideas?

    Here's how I've done this:
    SELECT ORG_ID,
           CLEARER_NAME,
           LEGAL_NAME,
           MARGINING_ACCOUNT,
           RULE_GROUP_DESCR,
           VIOLATION_COLOR,
           VIOLATION_LEVEL,
           CASE MARGIN_IND
            WHEN 'Y' THEN '&nbsp'
            ELSE '<a href="#" title="Ignore This Alert"><img src="/i/ice/images/hide.png" alt="Ignore"></a>'
           END AS IGNORE_LINK,
           ....This takes care of either showing (or not showing) the link.
    IN order to process when it is present, not that the address is "#" This will cause your cursor to change to a hand (or whatever your pointer is) when the mouse floats over the link. The actual transfer to the next page, I handle with jQuery/JavaScript.
    Create a Dynamic Action.
    Event: Click
    Selector Type: jQuery Selector
    jQuery Selector: 'aalt'
    Event Scope: Live
    (note that the jQuery Selector is finding the alt attribute that I set on my link in the SELECT above . Tweak as needed.
    This "Action" for this DA will be to "execute JavaScript code"
    Normally, I would set some values into Page Items and then create a branch to pass this values to the next page. I am doing the same thing in the following code. I am getting the values off of the row wherein the user clicked on the link. I am setting these values from the row into the page item values. Then, I am submitting the page. All the "htmldb_Get" business is just stuff that I have to do to get the page item values into the session (so that I can pass them to the next page).
    var clickedRow = this.triggeringElement.parentNode.parentNode.parentNode;
    var ruleGroupDescr = $(clickedRow).children('td[headers="RULE_GROUP_DESCR"]').html();
    var ajaxRequest = new htmldb_Get(null, $x('pFlowId').value, null, 0); 
    gReturn = ajaxRequest.get();
    $s('P31_RULE_GROUP_DESCR', ruleGroupDescr );
    ajaxRequest = null; 
    var clearerName = $(clickedRow).children('td[headers="CLEARER_NAME"]').html();
    var ajaxRequest = new htmldb_Get(null, $x('pFlowId').value, null, 0); 
    gReturn = ajaxRequest.get();
    $s('P31_CLEARER_NAME', clearerName );
    ajaxRequest = null; 
    apex.submit("IGNORE");Finally, just create a branch to the next page and set the items on the next page to the ones on this page that are being set in the above script. Note that in my example, I have set the request to "Ignore" when I submitted; so, I set the condition of my branch to be Request = IGNORE.
    Hope this helps,
    -Joe

  • Interactive report, conditional display of column link

    Hello,
    We have requirement to disable editing in case that status of field is 1 (1=Closed).
    Is there any way to disable it on interactive report.
    case when status=1 column link should be disabled (not visible) in order to prevent future edits on payroll.
    SELECT payroll_no, status
    FROM hr_payroll
    ORDER BY payroll_no DESC;
    I tried link below, but it's not working in my case.
    http://nerd.net.au/24-apex-application-express/report-layout/92-conditionally-show-report-link-column-based-on-value-of-…
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    Application Express 4.2.2.00.11
    Thank you in advance,
    Regards, FM

    CASE WHEN status = 'ACTIVE' then
    <a href="f?p=&APP_ID.:60:&SESSION.::&DEBUG.::P60_EMPLOYEE_ID:'||employee_id||'"> </span><br /><span class="Moobi_Code"><img src="#WORKSPACE_IMAGES#deactivate_button.png"></a>'</span><br /><span class="Moobi_Code">ELSE NULL END deactivate_employee,
    from
    EMPLOYEES
    What exactly is the error you get? What HTML is showing in the HTML source?
    Just by looking at this I would say you need to remove the "/" in front of the f?p
    Keep in mind this way could cause problems if you start to use checksum, then you might want to look into using APEX_UTIL.PREPARE_URL to create your URL.

  • Interactive Report : Conditional Link Column

    Hi,
    I want my interactive report Link Column (Link to single row view) will be visible/active only when for the logged in current user.
    I am keeping the current user data in an "application_item".
    When ever I am trying to put Condition type as "Value of Iten in Expression1 = Expression 2" with
    Expression1 = CURR_USER (application item) and
    Expression2 = First_user (user_Name)
    the link column becomes invisible for the entire report.
    Please Please Please help.
    Thanks
    Neetu

    Hi,
    See if condition type "User is Authenticated (not public)" is what you looking for.
    Br,Jari

  • Conditional WHERE clause for APEX

    Dear SQL gurus,
    I know that there's a APEX forum, but I think that there maybe an sql based solution for this...
    What I have is a query like this:
    SELECT COMMENT_ORIG, COMMENT_CHARGING
    FROM  CL_INVENTORY_OPEN_OUT
    WHERE INCIDENTAL_FK=:P13_INCIDENTAL_FK where :P13_INCIDENTAL_FK is a field in the Web Based GUI...
    What I need is to change the WHERE clause to something like this
    WHERE
      DECODE(:P13_INCIDENTAL_FK, NULL, 1=1, INCIDENTAL_FK=:P13_INCIDENTAL_FK)so to say:
    if the : P13_INCIDENTAL_FK is null, then let the clause be 1=1, otherwise let it be NCIDENTAL_FK=:P13_INCIDENTAL_FK.
    Is there a way to do this inside a sql statement?
    Best Regards and THX
    Johann

    SELECT COMMENT_ORIG, COMMENT_CHARGING
    FROM  CL_INVENTORY_OPEN_OUT
    WHERE INCIDENTAL_FK=:P13_INCIDENTAL_FKDo not know how you are using the query, but you might try something like this
    BEGIN
      CASE :P13_INCIDENTAL_FK
        WHEN NULL THEN
          SELECT COMMENT_ORIG, COMMENT_CHARGING
            FROM  CL_INVENTORY_OPEN_OUT
        ELSE
          SELECT COMMENT_ORIG, COMMENT_CHARGING
            FROM  CL_INVENTORY_OPEN_OUT
           WHERE INCIDENTAL_FK=:P13_INCIDENTAL_FK
      END CASE;
    END;Edited by: ajallen on May 7, 2010 6:44 AM

  • Is this conditional WHERE clause possible?

    Let's say at the beginning of a stored procedure I do this:  DECLARE @hasActualHours BIT
    I'll then employ logic to set this local variable to either 0 or 1.
    I'm interested to know if I can then use it to either include or exclude entire "AND..." clauses within my WHERE clause?
    For example:
    SELECT ...
    FROM ...
    WHERE
      Clause 1... AND
      Clause 2... AND
    Now, I have a Clause 3 but I
    only want to include it if @hasActualHours = 1.
    Is it possible to do something like that in T-SQL?
    Robert

    >> Let's say at the beginning of a stored procedure I do this:  DECLARE @hasActualHours BIT
    I'll then employ logic to set this local variable to either 0 or 1.
    I'm interested to know if I can then use it to either include or exclude entire "AND..." clauses within my WHERE clause? <<
    No, no, no, no!  Your whole approach is totally wrong. Not a little wrong, but totally wrong. You just heard that from someone who helped write the SQL Standards, has 1200+ articles and 10 books on this topic. Please listen. 
    SQL is a declarative language, not a procedural flow control language. Declarative languages have no flow to control; there is no IF-THEN-ELSE, no loops. 
    SELECT ...
      FROM … 
     WHERE Clause 1... 
       AND Clause 2... 
       AND <expression for actual hour count> > 0.00;
    >> Is it possible to do something like that in T-SQL? <<
    Sure, we can kludge it! But first post a statement for your boss to see that you do not care about maintaining code, performance and professionalism. This would be bad for your career; like saying you eat babies on a parenting forum :) That is what the other
    replies are! 
    right now, you are the kid on a baseball diamond asking by which end do you hold the umpire. You are not thinking in SQL yet. My rule of thumb is you need a full year of SQL with a good mentor (read that last phrase again). It is a different mindset. 
    I wrote a book, THINKING IN SETS, to help with the change. See if that helps. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Plain SQL Conditional WHERE Clause with two sub-selects

    Hi SQL Experts,
    I need a bit quick of help with a query.
    This is a "select" statement for an OBI repository phyiscal table source object.
    So I cant put PL/SQL or Stored Procedures in it. I just need
    to have two different conditions/selects depending on the user role (this information comes
    from the session).
    The above, does not work:
    --------------ORA00905. 00000 -  "missing keyword"
      SELECT OFFICENO FROM orgunit
      WHERE
      CASE WHEN 'SESSION_VARIABLE' LIKE '%globalmanager%' THEN  
            ASSIGNEDOFFICES =
            SELECT DISTINCT ASSIGNEDOFFICES
            FROM USERSTABLE INNER JOIN orgunit ON
            orgunit.OFFICEKEY = USERSTABLE.OFFICEKEY
            WHERE USERSTABLE.USERNAME ='VALUEOF(NQ_SESSION.USER)'
      ELSE
            OFFICENO =
            SELECT DISTINCT OFFICENO FROM USERSTABLE
            INNER JOIN orgunit ON
            orgunit.OFFICEKEY = USERSTABLE.OFFICEKEY
            WHERE USERSTABLE.USERNAME ='VALUEOF(NQ_SESSION.USER)'
      END;   
    Can anyone help?

    Hi,
    I can't tell what you want to do just by looking at code that doesn't do it. Maybe:
    SELECT  officeno
    FROM    orgunit
    WHERE   (    session_variable  LIKE '%globalmanager%'
            AND  assignedofficies  IN
                     SELECT  assignedoffices
                     FROM    usertable  u1
                     JOIN    orgunit    o1  ON o1.officekey = u1.officekey
                     WHERE   u1.username    = 'VALUEOF(NQ_SESSION.USER)'
    OR      (    NVL ( session_variable
                     )        NOT LIKE '%globalmanager%'
            AND  officeno        IN
                     SELECT  officeno
                     FROM    usertable  u2
                     JOIN    orgunit    o2  ON  o2.officekey = u2.officekey
                     WHERE   u2.username   = 'VALUEOF(NQ_SESSION.USER)'
    There might be some simpler and more efficient way, depending on your tables and your reuirements.
    The condition u2.username   = 'VALUEOF(NQ_SESSION.USER)' is almost certainly not what you really want.
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002#9362002

  • How do I retrieve the Current Interactive Report Tab Identification

    I have found the FLOWS_030100.Tables.WWV_FLOW_WORKSHEETS and related tables which contain the information relating to the Interactive reports.
    I am writing a Procedure which need the 'Conditions' relating to a Saved Report tab of a Interactive report.
    I am able to retrieve the some current info via 'Substitution Strings' like:
    Flow_ID via APP_ID
    Page_ID via APP_PAGE_ID
    Session_ID via APP_SESSION
    This info will get me to the WWV_FLOW_WORKSHEET_RPTS table which relates to the individual Saved Reports for a IR.
    But if I have multiple Saved Reports on a single IR, I need to find the WWV_FLOW_WORKSHEET_RPTS.ID to be able to find the related rows on the WWV_FLOW_WORKSHEET_CONDITIONS table.
    Is there a location where I can find the current IR information like the 'Substitution Strings' I listed above that will get me this info?
    How would you attack this problem?
    Thanks

    Trying to report off of an interactive report conditions reliably will lead you down a long road of frustration. Getting the current tab ID is not too tricky here is some JS to get you started:
    function getCurTab() {
      //alert('function called');
      //Populate the array with all the page tags
      var tabs = $x('apexir_REPORT_TABS').getElementsByTagName("span");
      //Cycle through the tags using a for loop
      for (i=0; i<tabs.length; i++) {
        //alert(tabs.className);
    //Pick out the tags with our class name
    if (tabs[i].className=='current') {
    //Manipulate this in whatever way you want
    alert(tabs[i].id);
    setTimeout("getCurTab()",5000);
    getCurTab();
    This is just a rough and dirty example. This could greatly be improved by using jQuery and an onclick event rather than the timeout. So dont use this in any sort of production environment.
    Cheers,
    Tyson Jouglet                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Interactive Report - is it possible to stop a column being hidden?

    I have an interactive report region where i have a column that has a link that performs an action, in this case it links to a screen where the user can then add a row. I want to make this column mandatory and not let the user hide it. I can remove other functionality, but cant seem to control the hide/show functionality.
    anybody got any ideas?
    craig
    [oracleapplicationexpress.com|http://www.oracleapplicationexpress.com]

    Dear Hemanth,
    To your question:
    "Is it possible to stop a campaign from being cancelled if it has purchase orders attached to it, using standard functionality".
    This might be possible with a BADI implementation. In enhancement spot CRM_MKTPL there exist a BAdI CRM_MTKPL_OL_OBJ where the interface method CHECK_BEFORE_DELETE is offered.
    Regards,
    Anik

  • SAP CRM 7.0 - Interactive reporting tool enhancing reports with new fields

    Hi Everyone,
    I am a BW Professional, currently working on evaluating the true benefits of implementing Interactive Reporting tool for our company. As I understand the Interactive reporting tool restricts us to report on individual reporting areas like Activities, Leads, Opportunties etc.
    But according to our business it is very important for us to be able to report on cross reporting areas real time i.e. activities & leads together or activties, leads & opportunties together etc.
    I learned about the enhancement work bench in interactive reporting tool where we can add SAP fields to individual reporting areas, so I thought of adding leads & opportunties to activities. This is where the fun part starts.
    Here I learned that all activty ID, Lead ID and Oppo ID are all fed from one single field from SAP CRM i.e. OBJECT_ID, which means the system is dividing this data into individual reporting areas based on type of data i.e. leads or oppor's etc. and may be based on some key like account etc. So here is a technical question, for me to add a new field to a reporting area I have to give a field name but we already have OBJECT_ID from where I am pulling activties data, so if I want to include leads also in activties then I will have to add some logic manually to get that and can't use enhancement workbench because it is for missing fields from SAP CRM whereas in my case I already have OBJECT_ID from where I am getting Activity data.
    Sorry if I am driving you guys crazy but I am just trying to think loud to make myself clear with concepts.
    Also I have seen that a reporting area in Interactive reporting tool is based on a BW query, but I am not sure why not all the fields in BW query are available for reporting in Interactive reporting tool?
    Any help or commets will be greatly appreciated.
    Thanks & Regards,
    SRV

    Hello,
    checking with the config wizard is always a good idea since it's the only supported way to configure this scenario
    The secret is that you apparently did not activate the report areas. It is a bit missleading that the queries are checked before the report areas are checked, therefore you see the errors concerning the queries first. Below those errors you should find some lines like
        Report areas: delivered 15, active <?>
        CRM interactive reports: delivered 20, active <?>
        Activation of report areas checked
    The last line offers some documentation and the actual link to activate the report areas.
    Best regards

  • How to modify standard or custom Interactive Reports

    Hello everyone!
    Is there a possibility to modify SAP standard Interactive Reports? Where can this be done?
    Also if I create a new custom Interactive Report using Wizard in WebUI I don't find any transaction where I can modify it. Should I use some SAP GUI transaction to do this? Or even BEX    Analyzer? Perhaps there is SAP Documentation about how to do it but I wasn't able to find it.
    Many thanks in advance for any help! Kind regards,
    Sasha

    Sasha
    To do this, you need to be logged in with the ANALYTICSPRO business role (standard). Once you access the web UI you will have the option to Search reports. Doing this will show you both the standard reports and the ones modified by you. If you want to modify the SAP delivered reports, select the report, click the Copy button and then rename it etc. You then walk through the wizard and make the changes you need.
    You can also modify the ones you created by clicking on Edit.
    Once you have created your new reports, go to t-code ordywb, then make sure the Show Custom Reports checkbox is clicked. This will show you the identifier for your custom report - this is what you put against your logical link in the nav bar profile to enable the users to run the reports.
    Hope this helps!
    Lisa

  • Interactive Report Viewing

    Post Author: fahadayub
    CA Forum: Crystal Reports
    The Crystal Report 2008 Features page shows a sample of interactive report viewing where the report is changed between a chart, grid and data view based on a report parameter i.e. multiple views on the same data through a single report.Is this achieved by simply hiding / showing the appropriate sections of a single report? For example if the user selects chart then hide the detail section, if the user select data hide the header section. Ideally I would like to take a look at the report itself but haven't been able to find it in the report samples section.

    You Can download the scr8_distr_expert.exe [Here|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=http--supportbusinessobjectscom-communityCS-FilesandUpdatesNoNav-scr8distrexpertexeasp&sliceId=&dialogID=25524974&stateId=1%200%2025586513]

  • How many characters in users subscriptions of Interactive Report

    Hi,
    Can someone please help me in Apex 4.1. I would like to know how many characters can I enter in users subscriptions (email address) of Interactive Report and where data are stored.
    Thanks,

    Jessi wrote:
    Can someone please help me in Apex 4.1. I would like to know how many characters can I enter in users subscriptions (email address) of Interactive Report and where data are stored.
    Details of interactive report subscriptions are available in the APEX_APPLICATION_PAGE_IR_SUB APEX view. The maximum size of a subscription email address is 255 bytes.

  • Viewobject where clause

    Hi, i need to get the where clause from vo in a manage bean method when i'm using a query component.
    I have a button than execute one reports and I need to pass to reports a where clause generate in the page with the query component.
    thanks in advance

    Hi, i've got it. The code is the next:
    DCBindingContainer bc = (DCBindingContainer)this.getBindings();
    DCIteratorBinding dcIb = bc.findIteratorBinding("TwcdpalabclaveView1Iterator");
    ViewObject vo = dcIb.getViewObject();
    String v_query = vo.getQuery();
    System.out.println(v_query);
    System.out.println(v_query.indexOf("WHERE"));
    System.out.println(v_query.substring(v_query.indexOf("WHERE")));
    String v_where =v_query.substring(v_query.indexOf("WHERE"));
    v_where = v_where.replaceAll("WHERE","AND");
    System.out.println(v_where);
    AttributeList attr = vo.getNamedWhereClauseParams();
    String[] attrname= attr.getAttributeNames();
    String v_value;
    String v_name;
    int i =0;
    while (i<attrname.length){
    v_name = attrname;
    System.out.println(v_name);
    v_value = "'"+vo.getNamedWhereClauseParam(v_name).toString()+"'";
    System.out.println(v_value);
    v_where = v_where.replaceAll(v_name,v_value);
    i++;
    System.out.println(v_where);
    thanks dear friends for your time.
    Best regards.
    luis

Maybe you are looking for

  • What now for ibus and gsd?

    Well...ibus SEEMS to have a stable version now. And it's updated in Arch repo. So, should the INTEGRATION be enable in gsd again? Actually just before it's disabled, some engines begin to work. But while I stupidly tried to HELP the non-ibus users to

  • Unfixable disk permissions

    Hi, Since the upgrade to OS 10.4.4 my computer has more disk permissions issues that are not able to be fixed. Is this normal? thanks, Tom

  • SAP XI GATEWAY in order to comunicate with XI itself

    Hello All I have a program in abap XI . In a scenario (RFC to file) that I am making , the data of this RFC are the same parameters of the program . I want to call this RFC .. what gateway of XI do I  have to use ? Can I create a gateway in xi in ord

  • How to uninstall flash cs3(trial_download) ?

    How to uninstall flash cs3(trial_download) ? When install web premium(all) dvd cs3, flash will still work for another 1mo trial ?

  • Reader can't open PowerPoint attachments

    Hi folks, I've created a PDF document collection on CD for a client of mine. Several of the PDFs have PowerPoint presentation attachments. The entire collection has been password protected (allowing filling in of form fields, and low-res printing). W