Dataset Column Filter Within an Expression

I have a shared dataset called "CommAccessEnrollments." Within the dataset there is a column called "On_Net_Off_Net" that will output a value of either "On Net" or "Off Net." Within the same report I have a row of
just On Net results and another row with just Off Net results. I made 2 different datasets (from the same shared "CommAccessEnrollments" dataset) with filters on "On_Net_Off_Net" for On Net and Off Net results ("CommAccessEnrollmentsOnNet"
and "CommAccessEnrollmentsOffNet"). Instead of having to create two different datasets to derive the on net/off net information, can I define that within the expression?
Here is my existing expression for On Net: =Sum(Fields!M4.Value, "CommAccessEnrollmentOnNet") 
Here is my existing expression for On Net: =Sum(Fields!M4.Value, "CommAccessEnrollmentOffNet") 
Would something like =Sum((Fields!M4.Value, "CommAccessEnrollment") WHERE On_Net_Off_Net = On Net) work?
EDIT:
This expression also does not work:
=Sum(IIF((Fields!ON_NET_OFF_NET.Value, "CommAccessInstallsAll") = "On Net", Sum(Fields!M4.Value, "CommAccessInstallsAll"), 0))

Hi Pamela,
According to your description, you want to sum M4 values of "On Net" and "Off Net". Right?
In this scenario, since you have set the filter for the whole the dataset to filter the records where it is "On Net" or "Off Net". We can create a parameter to filter the records instead of creating two datasets. Specify "On Net" and "Off Net" as Available
Values and set the column equals the parameter. Now you just sum the M4 value and the scope should be the whole dataset. If you want to combine the records of "On Net" and "Off Net", you can set row group on "On_Net_Off_Net" and add Total for each group instance.
For your last expression, the reason why it's not working because we can't specify scope for a data field directly, so "(Fields!On_Net_Off_Net.Value,"CommAccessInstallsAll")" is invalid.
Reference:
Report Parameters (Report Builder and Report Designer)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou 

Similar Messages

  • OBIEE-Presentation Variable in SQL expression in a Column Filter

    Hi,
    I have the following:
    (1) A dashboard prompt having Month names like eg. October,July etc
    (2) I have declared a Presentation Variable by name @{Month}
    (3) A report is there where i have a column called 'Scenario' which has values like 'Actual','Budget','LE_Jul','LE_Oct' etc
    (4) In 'Scenario' column , i have given in the column filter-->SQL Expression as below:
    ('LE_'||SUBSTRING(CAST('@{month}{July}'AS CHAR(40))FROM 3))
    My end result should be like whatever month name(ex. July) is selected in the Dashboard Prompt, my scenario should be equal to 'LE_Jul'.
    I am getting Error like :
    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: 16001] ODBC error state: 37000 code: 8180 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: S0002 code: 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'DIM_SCENARIO'.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
    Pls give ur inputs if anyone has faced such an issue.
    Thanks.

    Hi,
    I checked that box in Connection Pool Settings.
    But now , though i have data for Scenario "LE_Jul", i still get No Results.
    Kindly let me know what else i am missing out in this regard.
    Thanks.

  • 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.

  • Dynamic value binding for InputTextField - Expression within an expression

    Hi,
    I have this requirement where I have to use an EL expression's output as a bean's property in the value attribute of a InputTextField. E.g.
              <h:dataTable value="#{entity.formats}" var="field">
                   <h:column>
                        <h:outputLabel value="#{field.shortDesr}"/>
                   </h:column>
                   <h:column>
                        <h:inputText value="#{*entity."+#{field.shortDesr}+*"}"/>     
                   </h:column>     
              </h:dataTable>
    The JSF page will be a generic one so the fields within a form will be dynamic and will be formed at run-time. Since the exact bean property(entity in the code above) for a particular field is not known before, it needs to be dynamicaly built
    To give more clarity. In the following snippet, i know that entity is the bean to be used but which property(XXX) the text field has to be bound is not known and needs to be assigned at run-time.
    <h:inputText value="#{entity.*XXX*"/>     
    Is this possible? Are there any direct JSF solution or work arounds for it? Appreciate your inputs.
    Thanks
    Ranjith

A: Dynamic value binding for InputTextField - Expression within an expression

Hi BaluSC,
Your solution is totally acceptable. But I was also looking for something that can make possible direct binding to the bean properties without going through a Map.
In the meantime, I worked around the problem by not using the DataTable. Instead I loop the collection and add the Form elements programatically (code given below). With this I am able to achieve the desired effect of binding directly to the bean's property. But I am hitting another problem now, On submit the form Seam throws up 'No active conversational context" error while binding the #{sdmManager.grid} attribute. Now, I am trying to figure out how to come across it.
JSF
     <h:panelGrid columns="2" binding="#{sdmManager.grid}">
</h:panelGrid>
Bean code
     public HtmlPanelGrid getGrid(){
     grid = new HtmlPanelGrid();
     List<UIComponent> children = grid.getChildren();
     Collection<FieldFormatData> formats = dataManager.getFieldFormatData();
     for(FieldFormatData format:formats){
          HtmlOutputLabel outputLabel = new HtmlOutputLabel();
          outputLabel.setValue(format.getShortDesr());
          children.add(outputLabel);
          HtmlInputText inputText = new HtmlInputText();
          inputText.setSize(10);
          inputText.setMaxlength(10);
          System.out.println("Binding ................................... " + format.getEntityField());
          inputText.setValueBinding("value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{entity."+format.getEntityField()+"}"));
          children.add(inputText);
     return grid;

Hi BaluSC,
Your solution is totally acceptable. But I was also looking for something that can make possible direct binding to the bean properties without going through a Map.
In the meantime, I worked around the problem by not using the DataTable. Instead I loop the collection and add the Form elements programatically (code given below). With this I am able to achieve the desired effect of binding directly to the bean's property. But I am hitting another problem now, On submit the form Seam throws up 'No active conversational context" error while binding the #{sdmManager.grid} attribute. Now, I am trying to figure out how to come across it.
JSF
     <h:panelGrid columns="2" binding="#{sdmManager.grid}">
</h:panelGrid>
Bean code
     public HtmlPanelGrid getGrid(){
     grid = new HtmlPanelGrid();
     List<UIComponent> children = grid.getChildren();
     Collection<FieldFormatData> formats = dataManager.getFieldFormatData();
     for(FieldFormatData format:formats){
          HtmlOutputLabel outputLabel = new HtmlOutputLabel();
          outputLabel.setValue(format.getShortDesr());
          children.add(outputLabel);
          HtmlInputText inputText = new HtmlInputText();
          inputText.setSize(10);
          inputText.setMaxlength(10);
          System.out.println("Binding ................................... " + format.getEntityField());
          inputText.setValueBinding("value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{entity."+format.getEntityField()+"}"));
          children.add(inputText);
     return grid;

  • Possible to set a default column value to an expression?

    Hi,
    Is it possible to set a default column name to an expression when creating a table?
    For example, I wish to set the default value of a column to read from another table's column and do some arithmetic....is this possible?
    Thanks.

    Yes, you can, with trigger Before Insert for Each row
    But be carefull, you can hit the mutating table problem...

  • Ability to Filter within an idividual perspective in a Tabular Model (cube)?

    I have a rather large Tabular model that I would like to use across 10 different reports as the requirements are identical, save for 1 aspect - the report goes out to 10 different companies. I need to be able to limit each result set by the individual
    companies, however a normal filter in a pivot table won't work as I cannot have each company seeing the other companies data.  I was hoping I could manage this via a perspective per company, but it doesn't look like you can limit or filter within the
    perspectives.  I am trying to find the best approach to accomplish this without having to build out 10 different tabular models to maintain.  I welcome any ideas on this; my searching didn't yield good results.

    You can do it in by
    1) Create perspectives with only allowed dimension members (individual company names in your list). This is done when you are creating the Perspective.
    2) Create a role for each company and in the allowed set for the dimension(company) only allow values for that particular one. So you will have one role per company.
    3) Have you considered the option of Dynamic Security?
    Please mark as answer, if this has helped you solve the issue.
    Good luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • SQL Developer 3.1.07.42 existing column filter no longer editable

    LO developers,
    I have noticed a change in behaviour (I would not call it a regression ;o) ) since v3.1 prod release.
    Until 3.1.07.42, when you add a column filter on a table or query resultset, you could edit the filter later. Since 3.1.07.42, it is no longer possible: one has to remove the filter first and then enter a new one.
    Is this the intended behaviour? I preferred the previous one.
    Have a nice day,
    Olivier.

    Unfortunately. Here is another forum thread referencing this issue, including the bug number:
    Another bug introduced in production release - table filter
    -Gary

  • InputDate Column Filter Date Format Problem

    Hi,
    I have an af:table with filterable columns and some of these columns are based on Timestamp VO attributes.
    When I enter a date filter - either manually or from the associated date picker, the filter is applied correctly using a date format of dd/MM/yyyy.
    However, when the table is subsequently refreshed, the filter value is still present but has been re-formatted to "yyyy-MM-dd hh:mi:ss" format (default format for a Timestamp datatype?). The an error appears in the column filter component - "Error: The date is not in the correct format".
    If I want to retain the filter value across queries, how can this be achieved?
    My table column is defined as follows:
    <af:column sortProperty="#{bindings.ViewDataVO1.hints.LastReadingDate.name}"
                                                   filterable="true" sortable="true"
                                                   headerText="#{bindings.ViewDataVO1.hints.LastReadingDate.label}"
                                                   id="c59"
                                                   rendered='#{bindings.ViewDataVO1.hints.LastReadingDate.displayHint != "Hide"}'
                                                   displayIndex="#{bindings.ViewDataVO1.hints.LastReadingDate.displayHeight}">
                                            <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                                </af:inputDate>
                                            </f:facet>
                                            <af:outputText value="#{row.LastReadingDate}" id="ot59">
                                                <af:convertDateTime pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                            </af:outputText>
                                        </af:column>I've tried messing with the properties of the af:convertDateTime component, but I'm thinking the problem is in the population of the filter facet inputDate with the vs.filterCriteria.LastReadingDate value. This does not appear to be re-formatted for display - but I don't know how to manipulate this value...
    Or is there a better way? This seems more complicated than it should be...?
    By the way, I am using JDeveloper 11.1.2.1.0 for my development.
    Thanks.

    Does it work fine if you change the pattern for convertDateTime?
    I.e
    change
    <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                                </af:inputDate>
                                            </f:facet>to
    <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="dd/MM/yyyy"/>
                                                </af:inputDate>
                                            </f:facet>-Arun

  • Oracle APEX 4.0  -  Interactive Report - Table Column Filter Issue

    Environment: Oracle APEX 4.0  -  Interactive Report - Table Column header Filter Issue
    We have developed an interactive report using Oracle APEX 4.0, which contains a record count of around 3,000 Rows. All the rows values are unique in nature. When we try to filter the same with the help of column header filter option available in the interactive report,We get only 1000 records.
    Could some one help us, why this behaviour under APEX Table Column Header Filter as if it does not display beyond 1000 distinct values.
    Is there a way or workaround on how to get all the records in the column header filter?
    Thanks in advance.
    Krish

    Hi
    Thanks for the advice and this issue has been moved to the below URL
    Oracle APEX 4.0 - Interactive Report - Table Column Filter Issue Posted: No
    Krish

  • Oracle APEX 4.0 - Interactive Report - Table Column Filter Issue Posted: No

    Environment: Oracle APEX 4.0 - Interactive Report - Table Column header Filter Issue
    We have developed an interactive report using Oracle APEX 4.0, which contains a record count of around 3,000 Rows. All the rows values are unique in nature. When we try to filter the same with the help of column header filter option available in the interactive report,We get only 1000 records.
    Could some one help us, why this behaviour under APEX Table Column Header Filter as if it does not display beyond 1000 distinct values.
    Is there a way or workaround on how to get all the records in the column header filter?
    Thanks in advance.
    Krish

    Krish,
    Interactive report has hard coded limit to display 1000 rows of column filter LOV for performance. Unfortunately, the limit cannot be changed. The workaround is to define a Column Filter LOV for the column instead of using "Default Based on Column Type".
    Regards,
    Christina

  • How do I keep account of line and column number within JTextArea?

    How do I keep account of line and column number within JTextArea?
    Thanks.

    hi kamlesh,
    to get the number of columns in a JTextArea u have the function
    getColumns() which gives u the number of columns in the text area.
    To get the number of rows present u have the function
    getRowCount() which returns an int that specifies the number of rows in the text area.
    Hope this helps
    Cheers :)
    Nagaraj

  • Fromatting date within an expression

    hi all!
    I have written a report which uses an expression to combine a couple of fields and some text in one sentence. the issue that I have is that when I combine texts and fields I don't have the ability to format the date so it comes out in a format that doesn't
    work for us in Australia.
    Can someone tell me an easy way (I'm a beginner) to change the format of the date when it is within an expression?
    This is the text i want "Raised by Allana Smith on 16 October 2013" and this is the expression I'm using.
    ="Raised by " & Fields!Raised_By.Value & " on " & Fields!Initiation_Date.Value
    and it comes out like this "Raised by Allana Smith on 2/21/2013"
    Thanks :)
    Allana

    Hi,
    try to use this
    ="Raised by " & Fields!Raised_By.Value & " on " & CONVERT(Fields!Initiation_Date.Value, 113)
    for more information on date formats please check this URL:
    http://www.sql-server-helper.com/tips/date-formats.aspx
    I hope this is helpful :-)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Can't get lookup column filter to work

    I have a backlog list (list 1) that is essentially a backlog of reqs.  I also have a task list (list 2) that is tasks tied those reqs.  In this second list,  I have a lookup column where user can select from the list of reqs.  I then
    pull in two additional fields associated with that req - release date and team.    In list 2, I can filter on req - no problem. I can filter on release date - no problem.  Filtering on team though seems to have issues that i can't figure
    out for the life of me.  In the filter drop down, it does show the team names that have are  "in use" in the view, but when I select on 2 of 3, nothing shows up - even though I clearly see rows with that team when no filter is on. 
    (the third team does work though shows up twice in column filter choice which I can't figure out why either). I've tried changing the team for an item, etc and still doesn't work.   See attached image - you can clearly see a row and filter have "product
    migration" team...but when i select it - nada!

    Anyone have any thoughts on this?

  • Position of column filter

    Hi,
    I have a customer requirement forcing me to place the column filter under the column headerText.
    I have no clue how to do that.
    I tried to google it(maybe with the wrong key words).
    I tried to find the component in the skin editor.
    Can anyone help?
    Any hints... Howto´s are welcome.
    Thx in advance,
    Christof

    Hi Christof,
    The af:column has facets. You can use the header facet to add something like a panelGroupLayout vertical oriented with the outputText containing the header and then the input with filter. However this would be a custom filter so you need to look at the how to create a custom filter model. Here the column tag documentation
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_column.html
    And here how to implement the filterModel
    http://www.connotea.org/user/jdeveloper/tag/filter
    Cheers,
    Juan Camilo

  • LOV table column filter with bind variable

    Greetings everyone,
    I am using JDev version: 11.1.2.3.0
    I have a table which has all it's columns with filterable property set to 'true'. I have already created a filter for the first one which displays the total list of users registered in the system. But the second one is a bit more complex.
    I want to display a LOV which takes it's values from a VO with a bind variable. In a normal situation there is a another VO which links one of it's properties to this bind var in the View Accessor section of the LOV configuration dialog just like this:
    http://2.bp.blogspot.com/_OSq71i5oy0c/SUa6qdnkkoI/AAAAAAAABnY/QnBPmGFgLI4/s400/3.PNG
    But i want to be able to display this LOV in a column filter, the code i used is this:
    <f:facet name="filter">
                             <af:selectOneChoice value="#{vs.filterCriteria.Debtor}"
                                    label="Debtor" unselectedLabel=""
                                     id="soc104">
                                                                            <af:forEach items="#{bindings.ContractPartiesView1.rangeSet}"
                                                                                        var="debtors">
                                                                                <f:selectItem id="si104"
                                                                                              itemLabel="#{debtors.Name}"
                                                                                              itemValue="#{debtors.PartyNumber}"/>
                                                                            </af:forEach>
                                                                        </af:selectOneChoice>
                                                                    </f:facet>
    Where Name is the name of the items to display, and PartyNumber is the value by which the table property (column) Debtor is connected to ContractPartiesView1 (the DC of the first VO).
    It doesn't display nothing, and i suppose this is due the fact that ContractPartiesView1 has that bind variable which stays uninitialized.
    I need to find a way to initialize this bind variable to get the filtered values for the LOV. I've tried to use a listOfValue binding insted of a tree, but with no result. Am i missing something?
    Thanks in advance

    I had resolved this, the very next day, but i didn't have chance to reply.
    I've simply created another VO, which didn't have a bind variable to get that ID, it was simply linked with a master detail relationship with the one it should get the ID from (via FK). I've created this other VO because the first one was already in use for some other requirement.

  • Maybe you are looking for