Unable to filter a formula field based on two conditions

hi,
I have a report with 3 subreports in it. When i drill down onto first subreport i am getting correct records in details based on selection criteria but when i am unable to populate the same record count in summary.
For example
On summary i see : 60 when i drill down i see 20 records which is correct but not reflecting onto summary report
the details selection criteria is based on two  fields where field1>=1 and field2= "Text"It is coming out good (20 records) but in summary i am unable to populate this based on same selection criteria
The main issue i am facing was if i apply a filter on summary selection criteria all the subreport counts are getting affected. Is there a way i can apply filters only one one field
Please suggest
Thanks!
Lucky

Thanks! for the prompt response Abhilash
I got part of what you told me. Yes i am calculating the counts in the summary report.
Basically here is the selection criteria: i need to filter the records based on two conditions. One is x.field1= "Admin" and x.field2=act_pct>=1
For example:
Admin Returns         50  but when i dig into details it showing as 20 records ( based on selection criteira above)
when coming back to summary . 50 what ever is returing here is based on a formula ( if x.field1="admin" then 1 else 0) ..in addition to this i need to filter that by x.field2>=1 which is not taking it     
Is there any syntax to do this
If i apply a filter on this particular 50 record its bee applying for whole summary report ...
And from what you said :
Why don't you create the summary in the Subreport and maybe use shared variables to bring it back to the Main Report?
i did not get this
Please suggest
Lucky

Similar Messages

  • WriteBack: Update a field based on two conditions.

    Hi Experts,
    I am facing a serious problem in write back to database.
    Let me explain the writeback i am trying to do.
    I have a table as Below
    Col1----- Col2---------Col3----------Col4
    100--------1-------------2----------100/(1+2)
    Col1,col2,col3 are editable.
    Once the values are entered in these columns Col4 is calculated by the formula (Col1/(Col2+Co3))
    If the user enters 0 in col2 and col3 then it will be a division by zero which i have handled by the DECODE function
    But the user requires a standard value to be shown there that is Col1/0.57895 whenever he enters 0 in col2 and col3.
    I initiially put a column formula for Col4 in answers saying if col2 or col3 = 0 then (Col1/0.57895)
    But as this formula is only at the prsentation level...teh values were not getting saved in the database.
    My requirement is i need to put this condition in the writeback xml itself and see to it that this standard value be updated in the table itself.
    like
    update table set col4=Col1/0.57895 where col2=0 and col3=0
    Update table set col4=(Col1/(Col2+Co3)) where col2 <>0 or col3<>0
    I am unable to use two update queries in teh xml template.
    Please let me know how can i implement this in the xml template.
    Appreciate your immediate response.
    -Best Regards!

    You can't do it in the xml but you can do it in the database with a before trigger update
    http://www.techonthenet.com/oracle/triggers/before_update.php

  • Summary on a formula field that makes a condition on a running total

    Hi,
    How come I can't create a summary on a formula field that makes a condition on a running total ?
    My running total field is a counter that counts the number of individuals
    My formula field contains this info :
    IIF ( ( {#counter_running_total} <> 1)
        or ( {#counter_running_total} = 1
              and {status.code} = '04' )
        or ( {#counter_running_total}  = 1
              and {status.code} in \[ 208 , 996 ])
    ,0,1)
    When I right-click on the formula field to insert a summary, it does not allow me.
    Do you have any idea I can show the information in a better way ?
    Thanks
    Steph
    Edited by: Stephanie Charest on Aug 4, 2008 8:00 PM

    Thank you very mutch for your reply, I tried it and it works.
    The thing is, I would like to reset the counter on change of group, and put the manual running total in the group footer.
    Is there a formula I could use to reset the counter ?
    When I write in the group header :
    whileprintingrecords;
    numbervar i=0;
    it does not reset the i to zero, instead, it writes "false" and continues to increment in the footer.
    do you have an idea ?
    Thank's
    Steph

  • Suppressing a section based on two conditions

    Hello
    currently, I am trying to suppress a section of group based on two conditions:
    - The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1.
    - The second condition is to supress the section if the GroupName ({Customer.TerritoryID})  is not UK or US.
    I went to the section expert and entered this code in the "Suppress (No drill-down)" x-2 formula field:
    DrillDownGroupLevel <> 1 AND
    GroupName ({Customer.TerritoryID}) <> "US" OR
    GroupName ({Customer.TerritoryID}) <> "UK"
    Unfortunately, it does not work. Any ideas are very welcome!!
    I am using Crystal Reports XI
    Thanks in advance!!

    Which "section of a group" are you trying to conditionally suppress?  (group header, group footer or details within a particular group......or all of them?)
    AND you stated,
    "currently, I am trying to suppress a section of group based on two conditions:
    The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1.
    The second condition is to supress the section if the GroupName ({Customer.TerritoryID}) is not UK or US.
    Try this formula for the conditional suppression:
    (DrillDownGroupLevel  <> 1) AND
    (GroupName ({Customer.TerritoryID})  "US") OR
    (GroupName ({Customer.TerritoryID})  "UK")
    If that does not work you may want to check and make sure your values are upper case in the TerritoryID.
    In addition, a GOOD way to test conditional suppression formulas is to put them into a conditional highlighting color for the section so you can still see the values and the highlighting lets you know if it's working.  For example:
    IF
    (DrillDownGroupLevel  <> 1) AND
    (GroupName ({Customer.TerritoryID})  "US") OR
    (GroupName ({Customer.TerritoryID})  "UK")
    then YELLOW else WHITE

  • DBPolling based on two conditions

    Hi All,
    We have a requirement in our bpel to process to poll the DB based on two conditions as we know how to poll on DB for one conditions.
    Any help is highly appreciated.
    Thanks and Regards,
    Nagaraju .D

    Sorry it is late here, I was thinking of selecting data, forget what I have said.
    Polling condition needs to be a sequence so there is no possibility of missing rows. Things like date, id etc
    If you need to use multiple conditions you need to concatinate the fields as part of the select statement. You may need to create a view for this.
    Obviously if you are doing a physical delete, or a logical delete there is no such issue as BPEL will read every row that is in the table, or where the flag is set to not processed.
    Hopefully this helps, sorry for mucking you around
    cheers
    James

  • Joins on different fields based on a condition

    Hi,
    I have 2 tables, each consists of 5 fields, based on Field3's data, I want to join either F1 & F2 or F4 & F5.
    I have given below the field creation and sample data for your reference. When I run the SQL with "case when .."
    statement, it gives "ORA-00905: missing keyword" error.
    I can do this by splitting into 2 separate SQL statements one for F1 & F2 and the other for F4 and F5.
    Is there any other better way of doing it in a single SELECT statement?
    Please share your views, thank you.
    create table tmp_a
    (f1 varchar2(50),
    f2 varchar2(50),
    f3 char(1),
    f4 varchar2(50),
    f5 varchar2(50))
    create table tmp_b
    (f1 varchar2(50),
    f2 varchar2(50),
    f3 char(1),
    f4 varchar2(50),
    f5 varchar2(50))
    begin
         insert into tmp_a
         values('R1', 'abc', 'L', 'A1', 'B1');
         insert into tmp_a
         values('R2', 'lkj', 'L', 'A2', 'B2');
         insert into tmp_a
         values('R3', 'qwe', 'M', 'A3', 'B3');
         insert into tmp_a
         values('R4', '123', 'M', 'A4', 'B4');
         insert into tmp_b
         values('R3', 'qwe', 'L', 'A1', 'B1');
         insert into tmp_b
         values('R2', 'lkj', 'L', 'A2', 'B2');
         insert into tmp_b
         values('R4', '123', 'M', 'A3', 'B3');
         insert into tmp_b
         values('R1', 'abc', 'M', 'A3', 'B3');
         commit;
    end;
    select * from tmp_a;
    select * from tmp_b;
    select a.*, b.*
    from tmp_a a, tmp_b b
    where a.f1 = b.f1 and a.f2 = b.f2;
    select a.*, b.*
    from tmp_a a, tmp_b b
    where a.f4 = b.f4 and a.f5 = b.f5;
    select a.*, b.*
    from tmp_a a, tmp_b b
    where case when a.f3 = 'L' then
              a.f4 = b.f4 and a.f5 = b.f5
         else
              a.f1 = b.f1 and a.f2 = b.f2
    end;

    Maybe something like:
    SQL> SELECT a.*, b.*
      2    FROM tmp_a a, tmp_b b
      3   WHERE CASE
      4            WHEN a.f3 = 'L'
      5               THEN a.f4
      6            ELSE a.f1
      7         END = CASE
      8                 WHEN a.f3 = 'L'
      9                    THEN b.f4
    10                 ELSE b.f1
    11              END
    12     AND CASE
    13            WHEN a.f3 = 'L'
    14               THEN a.f5
    15            ELSE a.f2
    16         END = CASE
    17                 WHEN a.f3 = 'L'
    18                    THEN b.f5
    19                 ELSE b.f2
    20              END
    21  /
    F1         F2         F F4         F5         F1         F2         F F4         F5
    R1         abc        L A1         B1         R3         qwe        L A1         B1
    R2         lkj        L A2         B2         R2         lkj        L A2         B2
    R3         qwe        M A3         B3         R3         qwe        L A1         B1
    R4         123        M A4         B4         R4         123        M A3         B3
    4 rows selected.Regards,
    Jo
    Edited by: Joice John on Jul 17, 2009 4:30 AM
    Sigh!!! Sean you are too fast for me.... ;)

  • Start Local chain based on two conditions

    Hello,
    I want to trigger a local chain in a metachain based on success of two conditions.
    1) at a stipulated time.
    2) and on the completion of above process.
    Also is there a function module by which i can get the variant name of a process.

    how can this be achieved.
    Thanks
    Dutta

  • Using Summary or Formula fields based on what a string field has.

    Attached is an example report that was not created by Crystal Reports.  I am working on re-creating it in Crystal Reports.
    I am using Crystal Reports 2011.
    The Total line for each group of details needs to have sum total fields for only items for pieces, weight, etc. whose Serial No does not begin with B.  How do I do that?

    Hi Keith,
    Create a formula that defines a variable we will use.  This will go into a group header and resets the variable to 0 when the group changes.
    @intialize
    WhilePrintingRecords;
    NumberVar myTotal := 0;
    Drop this into the group header of the group where the total will appear.
    Your second formula will do the summing and goes usually goes into the Detail section:
    @process_records
    WhilePrintingRecords;
    NumberVar myTotal;
    if left (Uppercase ({table.FIELD}), 1) = "B" then
        myTotal := myTotal + {table.numberfield}
    Else myTotal;
    So this formula checks your field for the letter B.  You may not need to use Uppercase.
    The last formula will go into your Group Footer where you want your total to appear like:
    @showtotals
    WhilePrintingRecords;
    NumberVar myTotal;
    And that's it.  Notice the variable is populated with := and not just =.  The single = is a comparison so make sure you use the correct on.
    Good luck,
    Brian

  • Dynamic Action - How to enable  text field based on a condition

    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?
    Create two dynamic action
    1. Make it order number item disable on page load.
       Event : Page Load
       Action : Disable
       Fire When event result is : True
       Selection Type : Item
       Item : Your order number item
    2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
        Event : Change
        Selection type : item
        Item : your order type item
        condition : is not null
    True Action
        Action : Enable
        Fire When event result is : True
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    False Action
        Action : Disable
        Fire When event result is : False
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    Hope this helps you,
    Regards,
    Jitendra

  • Need Trigger that format a field based on two other fields

    Hello!
    I need to write a trigger, that reads on field and made some changes to it and saves the result in an other field in the same row. The trigger should work in insert and update cases.
    Does anybody can send me a frame, where i can fill my logic?
    Regards
    Heiko Glaeske

    In this example, column1 and column2 are the values being examined and the resultant expression is saved in column3.
    create or replace trigger trigger_name
    before insert or update on table_name
    for each row
    begin
      :new.column3 := :new.column1 + :new.column2;
    end;
    /

  • Hiding a caption and field based on context condition

    Hi,
    I have what should be a simple problem, but I'm not sure if what I'm doing is the correct way to solve it.
    I have a telephone number of a user master being output, and if there is an extension number I want to output that as well, separated by ext
    In the context node I have put a condition on the Extension field (GS_HEADER-FSABE-TEL_EXTENS1 not equals INITIAL), and debugging the code of the function module shows that %OUTPUT is not being called for the Extension field in the layout as expected.
    The Extension field in the layout is bound to the Extension field in the context, and the caption is set as "Ext"
    Therefore I either want to output
    Telephone: 01234 567890 ext 1234
    or
    Telephone: 01234 567890
    It's not working though, as I still get ext printing even when there is no Extension - have I done something wrong or is this not the correct way to go about this?
    Thanks,
    Vindaloo

    Thanks very much, this has solved the problem
    In the layout:ready event for the extension field I have put the following Javascript:
    // Hide the Telephone Extension caption & value if it is not populated
    if (this.rawValue == null) {
      this.presence = "hidden";
    I was under the misapprehension that simply putting a condition onto the field in the context would stop it being passed to the form and rendered.
    The layout:ready event seems to be the best place to put this code.  However, the adobe help for this event is confusing as it contains the following:
    Initiates after the form design and data are merged, the form exists, and the form's layout is applied. At this time, the finished form has not been rendered; therefore, a calculation or script set to run on this event could modify the layout before the form is rendered.
    This is fine and fits in with what I have.  It then goes on to say:
    Note: Scripts that fire on layout:ready should not do anything that would cause the layout of the form to change. For example, this would include anything involving subforms or tables that grow or shrink, adding fragments dynamically at run time, adding or removing subform instances, and toggling the presence setting of an object between hidden and visible.
    This seems to be in direct conflict with the previous statement, regarding modifying the layout.
    Vindaloo

  • Best way to validate currency field based on two picklists

    Hi,
    Im having a great deal of trouble creating validation for the following statement:
    If (Task type =”Call” or “Callback”) and (‘Outcome Category’ is “In Progress” or “Tried and Failed to Save” or “Saved”) then (‘Total Value of Policy’ must be > 0)
    Both task type and outcome category are picklist items.
    What is the easiest way for me to do this? Ive created something horribly complex which only works when I first create the record (possibly because of the use of FieldValue rather than stored values). Ive seen people use the NOT function before to do this - could this be an option?! Ive had no luck with anything Ive tried so far.
    My current expression is as follows:
    (FieldValue('<cTotal_Value_of_Policy_ITAG>') > 0
    AND FieldValue('<Type>') <> LookupValue("TODO_TYPE", "Investigation") - - Because call or callback are the only other options in the list.
    AND (FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "In progress")
    OR FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Tried & failed to save")
    OR FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Saved")))
    OR FieldValue('<Type>') = LookupValue("TODO_TYPE", "Investigation")
    OR (FieldValue('<Type>') = LookupValue("TODO_TYPE", "Call")
    AND (FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "In progress")
    AND FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Tried & failed to save")
    AND FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Saved")))
    Sorry for including this confusing chunk of code, but I think it explains how more complex i have made this than i probably need to!!
    Any help would be greatly appreciated as this is quite an urgent issue..
    Many Thanks
    AJ

    Anon,
    In your edit form, create two hidden items p10_ha, p10_hb (for e.g.) Make the default values for these items as values of p10_item_a and p10_item_b respectively. So when you are processing the update, you have old values in hidden items and new values in p10_item_a and b.
    Now create 'after submit' pl/sql computation and put similar code
    if p10_ha !=1 and p10_hb !=1 then
        if p10_item_a = 1 and p10_item_b = 1 then
        -- your business logic here   
       :p_date_item := sysdate;
       end if;
    end if;Hope it helps
    Cheers
    Hari
    Edited by: Hari_639 on Oct 27, 2009 9:21 AM

  • Top 10 based on two conditions

    Hello BW Experts,
    Wondering if this is possible in Bex.
    -- by default show the top 10 customer based on gross sales
    -- then give a navigational option in the context menu to show the top 10 customers by net sales.
    can this be achieved in bw using conditions.
    Any suggetions is greatly appreciated.
    Thanks,
    BWer

    Hi BWer,
    It is possible to do this using conditions. Start creating a condition in the query and use the Top N condition. Create 2 of these: One for each key figure. Then in the report you can activate and deactivate them to see results are desired.
    Hope this helps...

  • How to count number  of records for a field based on condition?

    Hi guys,
    I want to know how to find count of records coming from the database for a particular field based on some condition.
    I need to use this count to suppress some headers. Because of this i am not able to use running totals. Is there any other way?
    Ex scenario:
    I have account number and currency fields, those are coming from database. And i need to count the number of accounts whose currency is not Euro.
    Thanks in advance,
    Vijay.

    A simple formula can do that:
    //Formula begin
    if {your account field}<>"Euro" then 1
    //Formula end
    This formula can be summarized. (by group or report)
    Bryan Tsou@Taiwan

  • Top n  filter in universe based on two measures(MDX expression)

    Hi,
        I have to do filter at universe level based on two measures. for example, i have
    BusAr       year       value
    ddddfd        1997      435433.
    I can able to do filter using mdx expression for busniess area wise top 10 values in universe. using the following syntax
    <FILTER EXPRESSION="Rank([0BUS_AREA].CurrentMember, Order([0BUS_AREA].CurrentMember.Level.Members, [Measures].[D7G51I90GYJ8POGFSYVFPX24F], BDESC))">
    now i want to filter using year wise and business area wise top 10 filter  in universe.   where to add the second member yearwise in Rank () function.
    how to achieve this.
    Regards,
    Shanthakumar.

    Hi,
    I am not sure you want to make a Top n filter on 2 different measures.
    But if you want to make a Top n filter on 2 ore more different dimensions, here is the code.
    IIf(IsEmpty([Measures].[Sales Amount]),null,
      Rank(   StrToTuple( "(" + Generate(Head(Axis(1),Axis(1).Item(0).Count) AS RN,
      "Axis(1).Item(0).Item(" +
      CStr(RN.CurrentOrdinal - 1) +
      ").Hierarchy.CurrentMember",
      ",") + ")" ),
      Axis(1),   [Measures].[Sales Amount]  )    )
    Please note that the code is taking into account all dimensions involved in the rows axis, so the more dimensions yu add in the query the top n will increase the number of values.
    I have successfully tested it on MSAS but it seems that on SAP the "+" character is not allowed...
    Maybe there are some SAP notes to add.
    Didier

Maybe you are looking for

  • PL/SQL function body returning SQL Query Problem

    I have wandered around the forums and found quite a bit of helpful information that has gotten me to the point I am now at. Unfortuntely, PL/SQL is not my strongest point and I am getting an error when I attempt to run my report. This is what I have

  • My Airport extreme software will not load on my Macbook hardisk

    When I try instaling the Airport Utiliy software I get an error msg that says...the vesrion of Mac OS X on this volume is not supported.  Not sure what to do.

  • Setting JTree as expandable

    I have a JTree and it has Parent nodes and corresponding child nodes. I edit the values of child and when i refresh the tree, I need to set the edited node in the expanded mode. The expandPath() does not seem to be working. Is there any way of making

  • 0 KB Tiff is not Really 0 KB.

    Every so often when rendering a still sequence, AE will render out random frames as 0 kb (or at least that's how Windows 7 sees them).  However, I double click them and I have a full 1920x1080 still image, so it's imposible for it to really be 0kb. N

  • Preview Pane shifted up, hiding top line of message - ideas?

    Somehow, in the last week or so, something happened to cause the previewed message to be moved up, behind the list of messages, so that the "from" party is line in the header is hidden. There is a scroll bar on the right as normal, but it won't scrol