Count a distinct column value in an interactive report

Hi,
I'm struggling with this and would appreciate any pointers.
I have built a view here:
http://apex.oracle.com/pls/otn/f?p=11189:1
The report can have duplicate column values. I'm tying to find a way using the interactive report functionality (i.e. without modifying the underlying SQL) to count a distinct column value. For example, in the example following the link I'd like to be able to count the unique customer_ids and return 7.
This may be fundametally impossible depending on the way the SQL is generated for the interactive reports. If this is the case can anyone confirm this?
Many thanks
Yog.

<B>"Not modifying views is fair enough. But not wrapping a SELECT around them? Really? Why? And as I said, that's imposible, the IR already does it."</B>
This is not a problem. However for the IR's it's a development decision to keep all reported columns ( and analysis on these columns ) as a seperate development process to be controlled centrally by a seperate team. The point to remember is that the app looks at hundereds of views and it was decided that modifying each report to fit each instance would become cumbersome to manage and to put it simply there are not the resources to do it.
again, I'm not here to justify any of that!
<B>SELECT *" ? Every single time? Even when you want to populate a LOV with some names</B>
No just the Reports. It is a very very simple app; a big list an a page for each report.
<B>"I think you should always ask what you want, not less, not more"</B>
I agree, and that should include select * from view.
<B>"Why fetch data you don't want to see"</B>
Some users will want to see some data from the view and other users will want to see other data, Over the whole user base someone somewhere will want to see all of it.
<B> Actually, there is something good in this, in the future, when you will be asked to check and try to improve the load time of some page, here is the first place where you should look</B>
Brilliant! Like it!!
<B>Does it by any chance fetch a bunch of 20 meg LOBS and then discards them</B>
No, Thankfully a few varchar2 columns and a lot of numeric columns, nothing huge. The reports are acutally pretty fast at the moment...

Similar Messages

  • Default Style Column Breaking in an Interactive report

    In a normal SQL report there are two types of column break formatting:
    1) Default Breaking Format e.g.
    aaa 123
            456
    bbb 789
            123
    2) Repeat Headings e.g.
    aaa
    123
    456
    bbb
    789
    123
    Interactive reports seem to only implement Repeat Headings . Is it possible to break columns in an IR report using "Default Breaking Format"? If so how?
    thanks
    PaulP

    JB wrote:
    Is it possible to add conditional column formatting in an Interactive Report in Apex 4.1? I've found numerous examples for older versions using the standard (classic) report, but I haven't found any with the new Interactive Report. Is this possible? and if so, can someone point me in the direction of some documentation or examples?
    Oracle Application Express (APEX)
    As interactive reports lack the HTML Expression feature of standard reports, the simple way to do this unfortunately requires violating the separation of concerns and generating structural (a <tt>span</tt> element) and presentational (an in-line style sheet) aspects in the query:
    select
    ⋮        
           , case
               when trunc(calling_date,'DD') =  trunc(sysdate,'DD')
               then
                 '<!-- ' || to_char(calling_date, 'YYYYMMDD') || ' --><span style="color: #3399FF;">' || to_char(calling_date) || '</span>'
               else
                 '<!-- ' || to_char(calling_date, 'YYYYMMDD') || ' --><span>' || to_char(calling_date) || '</span>'
             end calling_date
    ⋮For number/date columns to be properly sortable, the leading edge of the column must be an HTML comment that provides the required sort order using character semantics, as shown here.
    The Display As column attribute for such columns must be set to Standard Report Column.
    This method has side effects: some IR filters won't work; aggregate calculations can't be applied to the column; and report exports contain the HTML rather than the expected value.
    Other approaches involve using Dynamic Actions/jQuery/JavaScript, or using the built-in highlight as suggested above, then saving the highlighted report as the default.

  • Conditional Column Formatting in an Interactive Report?

    Is it possible to add conditional column formatting in an Interactive Report in Apex 4.1? I've found numerous examples for older versions using the standard (classic) report, but I haven't found any with the new Interactive Report. Is this possible? and if so, can someone point me in the direction of some documentation or examples?
    I simply want to change the color of the text depending on whether a column has a value (eg. Error or Problem).
    Thanks

    JB wrote:
    Is it possible to add conditional column formatting in an Interactive Report in Apex 4.1? I've found numerous examples for older versions using the standard (classic) report, but I haven't found any with the new Interactive Report. Is this possible? and if so, can someone point me in the direction of some documentation or examples?
    Oracle Application Express (APEX)
    As interactive reports lack the HTML Expression feature of standard reports, the simple way to do this unfortunately requires violating the separation of concerns and generating structural (a <tt>span</tt> element) and presentational (an in-line style sheet) aspects in the query:
    select
    ⋮        
           , case
               when trunc(calling_date,'DD') =  trunc(sysdate,'DD')
               then
                 '<!-- ' || to_char(calling_date, 'YYYYMMDD') || ' --><span style="color: #3399FF;">' || to_char(calling_date) || '</span>'
               else
                 '<!-- ' || to_char(calling_date, 'YYYYMMDD') || ' --><span>' || to_char(calling_date) || '</span>'
             end calling_date
    ⋮For number/date columns to be properly sortable, the leading edge of the column must be an HTML comment that provides the required sort order using character semantics, as shown here.
    The Display As column attribute for such columns must be set to Standard Report Column.
    This method has side effects: some IR filters won't work; aggregate calculations can't be applied to the column; and report exports contain the HTML rather than the expected value.
    Other approaches involve using Dynamic Actions/jQuery/JavaScript, or using the built-in highlight as suggested above, then saving the highlighted report as the default.

  • Lowercase first letter in column name of non-interactive report..Again

    A couple of days ago a posted a question on how to make the column name in a non-interactive report
    come out as lowercase. (original post: Lowercase first letter in column name of non-interactive report
    I am using Theme13, which is probably the only theme that forces the first letter
    of a column name in a report to uppercase.
    Anyway, I received several responses including the answer which I applied to my page.
    Then I went back to make the column sortable and that negates the CSS override and
    the first letter in the column name is back to uppercase...arrrggghhh!
    Are there any further suggestions on how to force this to lowercase with theme 13 and a sortable column?
    Thanks
    Donna

    Hi,
    Try style to page HTML header
    th.t13ReportHeader,th.t13ReportHeader a:link,th.t13ReportHeader a:visited{
    text-transform:none!important;
    }Br,Jari
    Edited by: jarola on Feb 4, 2010 8:00 PM

  • Joining Two Tables with a DISTINCT column value

    I have two tables I need to join, but the 'left' table I only need DISTINCT for a column.
    create table t1
      bid  number(8),
      b_number number(8),
      dset varchar2(20),
      misc varchar2(20)
    create table t2
      cid  number(8),
      track number(8)
    select bid, cid
    from   ( select bid, b_number
                from   t1
                where dset = 'ABC1234'
                and    misc = 'TEXT'
             ) x,
             ( select cid, track
               from t2
               where exists ( select 1 from t2 where t2.track = t1.b_number )
             ) z
    where x.b_number = z.trackI only need records with DISTINCT cid values, but I keep getting multiple instanced of cid.
    Any suggestions?
    Thanks!

    Maybe this?
    select distinct cid
    from t2
    where track in
    select b_number
    from t1
    where dset = 'ABC1234'
    and misc = 'TEXT'
    )

  • How to hide some column filter operators in Interactive Report

    Hi,
    I have an APEX 4.2 application what includes Interactive Report page.
    Is there possibilty to hide or disable some filter operators in column filter?
    But I don't want to disable all filter functionality for end users.
    For example how to hide/disable operator "matches regular expression".
    Some filter operators are too complicated for end users.
    I have searhced but not found solution.
    regards,
    Erkki

    erkkik wrote:
    I have an APEX 4.2 application what includes Interactive Report page.
    Is there possibilty to hide or disable some filter operators in column filter?
    But I don't want to disable all filter functionality for end users.
    For example how to hide/disable operator "matches regular expression".
    Some filter operators are too complicated for end users.
    I wouldn't really recommend this. Users will quickly recognise what works for them and avoid options that they do not currently understand. However, over time—through training or advice from more experienced users—they may come to understand and use all of the available features. Blocking access (especially in a non-standard way) to options that users may eventually need is likely to result in unnecessary development work now and at some (possibly inconvenient) time in the future.
    That said, this really isn't difficult to implement using CSS. Use your browser web inspector to identify which filter types are to be blocked, using the value attribute of the filter Operator select list in the generated IR HTML. For example, in APEX 5.0 a filter operator select list looks like:
    <select id="R70597672218719366505_STRING_OPT" class="a-IRR-operator" data-column-type="STRING" title="Operator" name="p_ignore_10" size="1">
      <option value="=">=</option>
      <option value="!=">!=</option>
      <option value="is null">is null</option>
      <option value="is not null">is not null</option>
      <option value="like">like</option>
      <option value="not like">not like</option>
      <option value="in">in</option>
      <option value="not in">not in</option>
      <option value="contains">contains</option>
      <option value="does not contain">does not contain</option>
      <option value="regexp_like">matches regular expression</option>
    </select>
    The "matches regular expression" option has the value regexp_like, so the required CSS rule using the IR operator select list class and an attribute selector on the option value is:
    .a-IRR-operator option[value="regexp_like"] {
      display: none;
    Additional selectors for other filter types can be added to this rule as required, for example:
    .a-IRR-operator option[value="regexp_like"],
    .a-IRR-operator option[value="is not null"] {
      display: none;
    to eliminate the "is not null" filter.
    To implement this for all IRs in your application, create a custom CSS style sheet containing the rule, upload it to your workspace, and reference it in all of the page templates used for IR pages.
    This is not a 100% foolproof solution. CSS is not an appropriate way to implement security restrictions. A web-savvy user could use their web inspector to disable the CSS rule and access the blocked filter(s). However there is little risk here as (1) it appears that your users will lack the required expertise; and (2) doing so will only allow them to further filter data they already have access to.

  • Pass value from previous interactive report to create record form

    Hi All,
    I am an APEX newbie and have an APEX 3.2.1 application that is still being developed that is working reasonably well. The problem I am having is the following:
    I have 3 interactive reports. These are defined on their respective tables, namely, clients, servers, and databases. By clicking on a client name, it shows the servers that are associated with that client. By then clicking on a server, it shows me the databases that are on that specific server. I am able to perform updates, deletes and inserts on all of these.
    In order to say create a server, i click on the name of a client and it brings me to the Server Interactive report to see the associated servers. I then click a "Create a Server" link that brings me to the create a server page. The issue i am having is that I would like to have the previous value of the primary key (Client ID) passed from the Server interactive report to the form where i create a new server so that the client ID is already populated in the Create a Server form. Presently, the only way i am able to do this is by defining the client ID column on the Create a server form as a select list and displaying ALL the different clients. By selecting a client name, this list then returns the client id associated with that client name. This is a potential source of confusion for the users and it would be much better if the client ID was already in a text field that is disabled and all they have to do is fill out the other fields of the form.
    I would greatly appreciate any help in this matter as I am fighting project deadlines. I have seen other examples that are similar, but i am still experiencing difficulty.
    Thanks,
    Tim

    Hi,
    I am still very confused as to how to get this to work.
    I cannot have the value passed by clicking the client ID link from the Server Interactive Report in order to populate the Client ID field in the Add Server Form. It MUST be done by clicking an Add Server button that will pass the value as well as take me to the Add Server Form. So far, I have only been able to have the value show up if i click the client ID column on the Interactive report that has a column link defined as follows:
    Name VALUE
    P9_CLIENTID #CLIENTID#
    However, when i do have the value passed this way i receive the following error message which proves that it is not saving the god damn state!
    ORA-01400: cannot insert NULL into ("USERS"."NEW_SERVERS"."ClientID")
    Error Unable to process row of table NEW_SERVERS.
    Even if the value appears in the text field, it isnt really there!
    How to make it know the value is there is beyond me.
    I dont know what to think of this situation. I have tried all types of settings and I have a feeling it will be 2010 before this is resolved.
    It is really frustrating, it has been days i am trying to get this to work...
    Thanks,
    Tim

  • Using HTML,how to change the color of column data in an interactive report?

    Hi,
    I want to change the color of data of a column in an interactive report.
    I want to do it by HTML.
    I have tried the code
    <style type="text/css">
    #apexir_EMP_MANID{color:blue;}
    </style>
    But it changes the color of the heading of column only. Not the data.
    Plz can anyone suggest me something ?
    Thanks in advance

    Hi Vaibss!
    Is it that what you're looking for?
    Color Coding (Post number 5)
    regards

  • Newly added column not displayed in Interactive report

    Hello,
    I have a tableA with 3 columns.In the application i am displaying as Form with Report region as Interactive report(Oracle 10g Application Express 3.2).
    I added one column to tableA.Now when i am refreshing the report by adding that column in the select query,the new added column is not displayed in the application.
    How can i do this so that the added column can be displayed.I dont want to delete the whole thing and redo it again.
    Thanks
    Siya

    Hi Siya,
    The Interactive Report will not show you the newly added columns by default. You have to select those columns from the actions menu and when all the required fields are displayed then save it as the default report.
    Then you will be able to see all the columns.
    Hope this solves your problem.
    Thanks,
    Satish.

  • Column name change in Interactive Reports

    Hi,
    I am new to Interactive reporting. We have a report that is resulted from Essbase query. Now in the report, we want to change the column names which are basically the essbase dimension member name. Is it possible to chang ethe names per our requiremnet?
    Please help.

    Hi again,
    I think that you may have posted your question in the wrong forum. This one is for Oracle Application Express and maybe that is the reason why you didn't understand my response. If your issue involves Hyperion Interactive Reporting Studio or Hyperion reporting in general then you should ask in this forum instead:
    Hyperion Query and Reporting
    Covers Hyperion Interactive Reporting, Hyperion Financial Reporting, Hyperion SQR Production Reporting, Hyperion Web Analysis, and respective administration/development topics
    Sergio

  • Highlighting a value in an interactive report

    Hi,
    I have an interactive report on which i have a column which displays either "Y" or "N". My requirement is to display "N" in bold and red color for every record having N. How can i make it work in my interactive report.
    Thanks

    Hi Andy,
    I am sorry but didnt understand what you are asking thats why i posted my query. I didnt understand what you meant by standard report column. It was highlighting N in my previous post because i didnt write my code in CODE tag. Npw please have a look.
    select "DBNAME" ,
    "DBID" "Database ID",
    "INSTANCE_NAME" "Instance Name",
    "VERSION",
    "CREATED" "Creation Date",
    "HOST_NAME" "Host Name",
    DECODE (DB_TYPE_CODE,'P','Production','D','Development','T','Test','Unspecified') "Database Type",
    "NLS_CHARACTERSET",
    "NLS_NCHAR_CHARACTERSET",
    "GLOBAL_DB_NAME",
    "SITE_CODE" "Site Code",
    "RECORD_CREATION_DATE" "Registration Date",
    "DB_STATUS" "Status",
    "COLLECT_STATS" "Collect Stats",
    CASE CONMON WHEN 'N' THEN
    '<span style="font-weight:bold; color:red">No</span>' ELSE 'Yes' END
    "Monitor"
    FROM "#OWNER#"."MONITORED_DATABASES"
    ORDER BY dbnameThis is a table column which i am displaying as it is. Is it what you meant by "Standard Report Column"?
    Salman

  • How to highlight break column data in an interactive report?

    Relates to an interactive reports V4.x :
    In the break column area in an IR report, the labels and data seem to be very vanilla and hard to distinguish particularly if you break on more than one column. When I move a non-break column with a highlight defined (set on cell) into the break position, the highlighting disappears.
    Is it possible to somehow retain the highlight colour on break column data?
    Any hints?
    thanks in advance
    Paul P

    bump!

  • Referencing a row level field value in an Interactive Report using jquery

    I have an Interactive Report with a row level select_list:
    select ename "Employee Name",
    mgr "Manager",
    empno,
    APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from emp e, dept d
    where e.deptno = d.deptno ;
    When a user selects "Delete", i'd like to delete the EMPNO based on the row where the user selected "Delete". I have tried alerting on the following, but cannot figure out how to capture the row-level EMPNO:
    alert($v('apexir_EMPNO'));
    alert($('#apexir_EMPNO').val());
    Can someone tell me how to reference the specific EMPNO per row?
    Thanks in advance!
    John

    What about this:
    Dynamic action
    Event: change
    selector: jQuery selector:
    select[name="f21"]
    True action
    Exec JS code
    var row = $x_UpTill(this.triggeringElement, 'TR');
    var otherElement = $('input[name="f20"]', row)[0];
    console.log(otherElement.value);
    http://apex.oracle.com/pls/apex/f?p=45448:11 (bottom half)

  • Can i have more than 6 columns to sort in interactive reports  in apex 4.1?

    As of  now on clicking on Actions->format->sort only a select list with six columns is displayed in an interactive report . Is there any possibility to add more number of columns in this ? Can anyone help?

    Hey there. WELCOME to the world of Macintosh. You are in for a great ride with this machine and platform.
    Some good news for you regarding cameras. The neat thing about iPhoto, and indeed, the Mac, is that there is no setup required for hooking your camera to iPhoto. In fact, ANY camera you plug into the Macintosh that it recognizes will automatically work with iPhoto!
    I regularly use three different cameras with my iPhoto application. As soon as I plug into the USB port and power on my camera, the Mac figures out that it needs to start up iPhoto. iPhoto figures out how to talk to the camera, and gives me the option to import pictures from the memory card... no configuration, no extra software to install. I do this with a Canon camera, and two different Sony models.
    It's painless!
    If you find this message helpful or if it solves your problem, please indicate this by clicking the appropriate icon in the header of this reply.

  • HELP: Column not shown in Interactive Report

    I have an Interactive Report setup, I have added a new column to the report.
    But the new column doesn't show by default, for anyone to view this new column they need to use the GUI click the gear... and then click columns and add the column to the view.
    I noticed that "default report settings" under "interactive report attributes" the new column isnt listed in "Selected Columns section"
    is that the problem? how do I update this list without rebuilding the report from scratch.
    Thanks Jade
    Edited by: user13002266 on 29-Jun-2010 16:22

    sure, so there actuall instructions in the item half way down the page of the item configuration.
    anyways so what you do it log into the application as the devloper login, so if you have a custon autorisation scheme you will need to set it back to apex, then when your logged in to you app... goto the page with the report, click the cog icon and there is a selext/adjust columns option... when you have finished click cog and save report... you will have an option to save as default... when you save the report your done, and all users will see you changed, remeber to change autorisation back to you custom one if you changed it.
    sorry im on my phone so spelling is prob bad and I dont have apex handy so I have to do it from memory. :)
    thanks jade, hope this helps... should work mint... ask again if you have problem's and I will update this when I have a pc and apex around.

Maybe you are looking for

  • XSAN and 4K video editing

    I currently have an Apple Xsan 3 deployment using Mavericks Mac Mini MDC Atto Thunderlink to FC,  Promise 610f RAID with a JBOD and a Qlogic 5602FC 4GB switch. I was originally looking to simply upgrade my storage as our editors are working in ProRes

  • IMac Blueberry changing Display resolution default settings

    Hey everyone.... after a quick search I found this old archived post: 333 iMac OS 10.3.2 screen resolution? Posted: Oct 4, 2005 3:50 PM My mum is using an elderly 333 MHz iMac, tray-loading. She wanted to upgrade from system 8.6, so I updated the fir

  • F110-Payment Run: No valid payment method found

    Hi, Whenever we execute F110 Automatic payment run with 'bank transfer' payment method, the  documents for a particular vendor goes into the exception list as 'No valid payment method found' and this document is posted thru' HR- payroll. But now I no

  • Batch change shapes in InDesign to CMYK?

    Hi there, Is there a way to change batch (600shapes) shapes from RGB to CMYK within InDesign? Thanks

  • Word 2011 has memory leak after applying 10.8.1 update

    Word started crashing on me recently, it occurs every 8 to 10 minutes when i am working with a large documents.  I looked around at the forums and tried all the "Verify Disk Permissions", re-installing, removing normal.dot and word preferences and cr