Multiple selection criteria on same field, different parts of report

Post Author: CathyH
CA Forum: Formula
New user here - I just finished a Crystal Reports course and still don't know what I'm doing so I need help!
I am building a report that will show Bugdeted Revenues and Costs and Actual Revenues and Costs (4 seperate fields).
My report will be divided into several sections i.e. Manufacturing Phase, Installation Stage, etc.
Each section will include different Cost Categories (another field) so I need to be able to pull only certain records (categories) from this field.
Could someone please tell me how to structure the report as follows:
                                                    Budgeted Revenue        Budgeted Costs                 Actual Revenue            Actual Costs
Manufacturing Stage
Cost Category:
Paint                     
Hardware                         
Installation Stage
Labour
I will be most grateful for any help you can provide.
Cathy

Post Author: CathyH
CA Forum: Formula
Ok - so I've set up the different sections of the report...but I'm trying to insert formula fields for each Cost Category and having trouble with the formula to select only certain records (I keep getting an error).  It's probably very simple but I can't for the life of me figure it out - I tried all kinds of formulas before I posted for help.
Maybe this will clarify:
Sum the Total Current Revenue      of only Cost Category "Paint"
{PMCATEGT.TCURREVHM}        {PMCATEGS.DESC} = "PAINT"
and in another part of the report for example
Sum the Total Current Revenue of only Cost Category "Installation"
Cathy

Similar Messages

  • Select Statement to fetch Multiple records of a same field

    Hi one and all,
               I have ascenario like this,
    I need to fetch the material starting with 'MA%' and material Starting with 'RT%' and so on.....data from the table resb with reference to AFPO-AUFNR.
    Now how can write select Query.
    Iknow how to fetch for a single type of material 'MA%'(using LIKE)
    But for multiple selection of the same fieldi cant do anything ,
    if anybody knows Please Help me.....
    I wil be very thankful if u r helped.
    Regards,
    rajesh.

    I have been trying in the same way
    like
    DATA : sp TYPE char3,
           b3 TYPE char3,
           b5 TYPE char3,
           rt TYPE char3,
           sh TYPE char3,
           rp TYPE char3.
    sp = 'SP%'.
    b3 = 'B3%'.
    b5 = 'B5%'.
    rt = 'RT%'.
    sh = 'SH%'.
    rp = 'RP%'.
    SELECT * FROM
             resb
      INTO   TABLE gt_resb
    WHERE aufnr = wa_itab-aufnr.
    AND matnr LIKE RT.
    OR matnr  LIKE b3
    OR matnr  LIKE b5
    OR matnr  LIKE sh
    OR matnr  LIKE rp
    OR matnr  LIKE sp.
    its not working.
    Regards,
    rajesh S

  • How to add into dynamic selection criteria (FBL1N) - custom field from LFB1

    Hello all,
    i have following problem. I added new customer field into table LFB1 (Z* field). And now i need to use this field as dynamic selection criteria in transaction FBL1N. I enhanced selection view for logical database KDF - i have created new customer view and I added my new field from LFB1. It is OK, i see this field in dynamic selection criteria in FBL1N but if i try to select according that Z* field, short dump occured.  
    open cursor with hold LC_KRED for select (VF_KRED_FIELDS)
            from <b>VF_KRED</b>
              where LIFNR in KD_LIFNR
              and   BUKRS in KD_BUKRS
              and   LAND1 in KD_LAND1
              and   KONZS in KD_KONZS
              and   VBUND in KD_VBUND
              and   AKONT in KD_AKONT
              and   BUSAB in KD_BUSAB
              and (VF_KRED_WHERE)
    Problem is in VF_KRED - this is database view (LFA1 joins LFB1). This view has no Z* fields and therefore it cannot be use in statement above -> dump.
    Is needed repature of standard - enhancement of view VF_KRED?
    Thank you very much.

    Hi guys,
    thanks so far. I managed to show prompts in the report. But still my problem is nor 100% solved
    I would like t achieve that the filtered criteria in the report title is separated through a comma like in the report filter summary - e.g.: {001, 002, 003, 004} followed by just 1chart/table that is including the whole information.
    When I however just drag a variable into the report it automatically created different sections, right? Like ........ table, chart, whatever... .......table chart whatever........
    Regards

  • Using !format on multiple occurrences of the same field

    I'm trying to use the @if function to apply formatting to two occurrences of a field, but am not having any luck so far.  The specific example is that I have two check boxes on the template, and would like to have only one of them checked at a time, using the same field in my data file for both check boxes.  The field that I'm using in my data file is:
    ^field ACCOUNT_TYPE
    And the only two possible values for that field are CHECKING and SAVINGS.  On the first ACCOUNT_TYPE checkbox, I have entered the following !format:
    @(If("@_$_."=="CHECKING","X"," "))
    And on the second ACCOUNT_TYPE check box it is
    @(If("@_$_."=="SAVINGS","X"," "))
    The @if statement works fine when I apply it to only one of the check boxes, but when I apply it to both, nothing populates into the field.  A simple solution would be to change the data, but doing so is not an option in this case for me.  Any help or alternate solutions is appreciated.  Thanks!

    Hi
    I treid different combination keeping the same field name for two radio buttons but it didnt work. You can work out with an alternate solution , keep different name for two radio buttons say : JF07 & JF08
    And under JF07 for !Format event : @(If("@JF03."=="SAVING","S",""))
    And under JF08 for !Format event : @(If("@JF03."=="CHECKING","C",""))
    where JF03 is the field name which may have one of two value : i.e either SAVING or CHECKING
    So your form consits of 2 radio buttons ( JF07,JF08) and one field label JF03. In your dat file you have to refer to first radio button that appears first on the form i.e left to right or top to bottom.(So whatever radio button is appearign first in the sequence on the form from left to right use that radio button in dat file.Here its JF07)
    ^symbolset 108
    ^page 1
    ^field JF03
    CHECKING
    ^field JF07
    ==========
    ^symbolset 108
    ^page 1
    ^field JF03
    SAVING
    ^field JF07
    Hope this layman's altenate solution will give you a bit of relief.
    thanks
    jaY

  • Query selection criteria - changing description field..?

    Hi Experts,
    i want to change description filed in user query selection criteria form..
    i have 3 fileds  :
    docdate - this filed i want to chage 'Document First'
    docdate - This filed i want to change 'Document Last'
    name -
    my problem: screenshot
    [Click Here|http://img638.imageshack.us/img638/3466/userqueris.jpg]

    The system always asks with the description of the field you refer to with the parameter variable in the select statement.
    I sometimes defined a UDT only for getting the appropriate title in the parameter entering window. The table has no data; I used it only for its field names.
    (The parameter request can be placed inside a comment and the entered value is used setting an SQL variable like this:
    declare @d datetime
    /*select t.createdate from ordr t where t.createdate=[%0]*/
    set @d=[%0]
    This SQL variable can be used later in the real query.)
    (But then you loose the possibility to choose from the u2018List of existing valuesu2019

  • Report Painter - Change multiple selection criteria

    Hi Experts,
    I am new to report painter. I need to change a report which is being developed in Report Painter. I need to add extra selection criteria.
    Please help.
    Regards,
    Nitin.

    Please search for available information before posting, do not post basic questions.
    Thread locked.
    Thomas

  • Report painter Multiple selection criteria

    Hi all,
    i am facing problem that how to provide multiple selection 'exculde' options in report painters.can anyone help me in this?
    thank you,
    Anil.

    Please search for available information before posting, do not post basic questions.
    Thread locked.
    Thomas

  • Display/Print the Selection criteria entered by USER on the ALV Report o/p?

    Hi Experts,
    I hv a requirement of to print/display the Selection criteria entered by user in the selection screen.........on the top portion of the ALV report output lay out.
    There is a FM for this purpose, but, I forgot its name!!
    So, let me know the FM or FMs, so that, will choose, which is best one,
    or the piece of code, which covers all select-option entries..........appreciated.
    thanq
    Edited by: SAP ABAPer on Sep 3, 2008 6:35 PM

    Use the Function RS_REFRESH_FROM_SELECTOPTIONS get the selection details, now format the data accordingly in the TOP_OF_PAGE using the calss CL_DD_DOCUMENT.
    Check the below mention code.
    REPORT  ztest_page.
    TABLES: sflight.
    DATA : it_flight TYPE TABLE OF sflight WITH HEADER LINE.
    DATA BEGIN OF it_sel_opt OCCURS 0.
            INCLUDE STRUCTURE rsparams.
    DATA END   OF it_sel_opt.
    SELECT-OPTIONS: s_carrid FOR sflight-carrid.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE it_flight
       WHERE carrid IN s_carrid.
    END-OF-SELECTION.
      CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
        EXPORTING
          curr_report     = sy-repid
        TABLES
          selection_table = it_sel_opt
        EXCEPTIONS
          not_found       = 01
          no_report       = 02.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program          = sy-repid
          i_callback_html_top_of_page = 'TOP_OF_PAGE'
          i_structure_name            = 'SFLIGHT'
        TABLES
          t_outtab                    = it_flight
        EXCEPTIONS
          program_error               = 1
          OTHERS                      = 2.
    *&      Form  top_of_page
    *       text
    *      -->DOCUMENT   text
    FORM top_of_page USING document TYPE REF TO cl_dd_document.
      DATA : dl_text(255) TYPE c.  "Text
    * Add new-line
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
      CLEAR : dl_text.
    * program ID
      dl_text = 'Program Name :'.
      CALL METHOD document->add_gap.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_heading_int.
      CLEAR dl_text.
      dl_text = sy-repid.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
      CALL METHOD document->new_line.
      CLEAR : dl_text.
      dl_text = 'Selection Criteria'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 34.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
      CALL METHOD document->new_line.
      CLEAR : dl_text.
      CONCATENATE 'SELECT Option' 'SIGN' 'OPTION' 'LOW' 'HIGH'
      INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
      CALL METHOD document->add_gap
        EXPORTING
          width = 34.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
      CALL METHOD document->new_line.
      LOOP AT it_sel_opt.
        CLEAR : dl_text.
        CONCATENATE it_sel_opt-selname  it_sel_opt-sign
         it_sel_opt-option it_sel_opt-low it_sel_opt-high
        INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
        CALL METHOD document->add_gap
          EXPORTING
            width = 34.
        CALL METHOD document->add_text
          EXPORTING
            text         = dl_text
            sap_emphasis = cl_dd_area=>heading
            sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
        CALL METHOD document->new_line.
      ENDLOOP.
    ENDFORM.                    "top_of_page

  • Multiple selection list and passing that value to oracle reports

    Hi
    I need to create a multiple selection list and then based on use selection, I need to pass that value to oracle reports. Can any one help with steps on how I can do this. Thanks

    Hi
    Concatenate the multiple values into a string separated by comma and then pass that string to report as a parameter.
    In report query, you have to use the lexical parameter using ' & '
    regards
    SD

  • How to filter out multiple rows , using multiple selection criteria ?

    Dear Expert's,
    I am stuck with a problem while designing my dasboard.
    I have data in the following format.
    Year - Quarter - Customer - Division - KF1 - KF2
    2005 - Q1 - SAP - Consulting - 10 - 20
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    2006 - Q2 - RAM - Jets - 11 - 11
    What i wish to do, is to create radio box(for selection) to choose any Year, Quarter , Customer & Division
    eg if the user chooses 2005 , i want to display 3 line entries
    2005 - Q1 - SAP - Consulting - 10 - 20
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    if the user further selects quarter - Q2 (without disturbing the selection on for year ) the result should be
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    If the selection from year is removed (still maintaining the selection on quarter Q2 ) the result should show
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    2006 - Q2 - RAM - Jets - 11 - 11
    Simply i need to create a filer for all the fields.
    The issue that i am facing with filer component is that - 1 - it returns only one desitnation row , 2 - you can only get Key values in result set
    Issue with combo box is i cannot select multiple fields (dimensions) using it .
    Please suggets .
    Thanks in Advance

    Hi Ankit,
    There is a workarround that requires some excel work.
    Here you need to follow the above mentioned steps along with this you need an additional combo box (wont be displayed at runtime, it will fetch the entire data if we select blank for the first combo box).
    Now suppose we are using 2 combobox C1 and C2 and our data is from B3 to F6.
    Now for C1 (one we are using for selection)
    1. select the labels as Sheet1!$B$2:$B$6 (a blank cell is added for all selection)
    2. Insertion type as filtered Rows
    3. Take source data as Sheet1!$B$2:$F$6 (includeing one blank row)
    4. selected Items as none
    5. for C2 labels as Sheet1!$A$3:$A$6 source data as Sheet1!$B$3:$F$6 destination as Sheet1!$B$14:$F$17.
    6. Selected Item : Sheet1!$B$9  (blank  Type dynamic). So it will select the entire table, if nothing is selected.
    7. take a Grid component and map it to Sheet1!$H$9:$L$12. use formula as =IF(IF($B$9="",B14,B9)=0,"",IF($B$9="",B14,B9)) on cell H9. Where we take H6 to L12 as final data set. Tis will become the data for next set fo Combo box for further selection.
    8. follow the same steps for other combobox selections.
    9. control the dynamic visibility of grids on the basis of Destination cell (like B9).
    Revert if you need further clarification.
    Regards,
    Debjit

  • Optimization of an update that uses multiple selects on the same table

    Oracle version : 10g
    Hello,
    I have created an UPDATE statement which uses two selects on a single table to do an update according to date criteria.
    Due to the fact that the update has different criteria for updating according to whether the date falls within one of two ranges
    (future or past) two selects were used together with a union between them to unite the results.
    The end result is of course two full table scans and a poorly performing execution.
    The goal is to update a field XDEL (type number) based on a date column value (column XDATE) where the dates of interest
    fall both in the past (less than sysdate minus 45 days) and in the future (greater than sysdate +90 days). For records with XDATE
    values within these ranges, I wish to set field XDEL=1
    For records in the future (>=sysdate+90):
    for a unique combination of XNAME+XCODE, where XDATE is within the date range for update, set XDEL=1
    but for a non-unique combination of XNAME+XCODE+XDATE, update XDEL=1 only for the 'oldest' future record, ie update XDEL for MIN(XDATE) only
    For records in the future (< sysdate+45):
    for a unique combination of XNAME+XCODE, where XDATE is within the date range for update, set XDEL=1
    for a non-unique combination of XNAME+XCODE, update XDEL=1 only for the 'newest' past record, ie update XDEL for MAX(XDATE) only
    The combination of XNAME+XCODE XDATE is unique. As an example of the 'in the past' scenario:
    XNAME | XCODE | XDATE
    ================
    1. AAAA ~ 002 ~ 01/01/2006
    2. AAAA ~ 002 ~ 02/01/2006
    3. AAAA ~ 002 ~ 03/01/2006
    4. XXXX ~ 123 ~ 02/01/2006
    Here, we would update XDEL in record 3. as it corresponds to MAX(XDATE) for the GROUP AAA002 (and we would also update record 4. as a unique record that meets the criteria)
    As an example of the 'in the future' scenario:
    XNAME | XCODE | XDATE
    ================
    1. HHHH ~ 002 ~ 01/01/2011
    2. HHHH ~ 002 ~ 02/01/2011
    3. HHHH ~ 002 ~ 03/01/2011
    4. XXXX ~ 123 ~ 02/01/2011
    Here, we would update XDEL in record 1. as it corresponds to MIN(XDATE) for the GROUP HHHH002 (and of course 4. as a unique record that meets the criteria)
    Here is a query that works, but is slow:
    UPDATE TAB1 SET XDEL=1 WHERE (XNAME,XCODE,XDATE) IN ((SELECT XNAME,XCODE,max(XDATE) FROM TAB1 WHERE XDATE < sysdate-45 GROUP BY XNAME,XCODE) UNION (SELECT XNAME,XCODE,min(XDATE) from TAB1 WHERE XDATE >= sysdate+90 GROUP BY XNAME,XADDR));
    XDATE is a DATE type
    XCODE and XADDR are VARCHAR2
    XDEL is number type
    Any ideas would be greatly appreciated.

    Here is a suggestion. The code is not tested.
    update tab1 t1
       set xdel = 1
    where exists (select null
                     from (
                            select xname,
                                   xcode,
                                   max(case when xdate < sysdate-45 then xdate else null end) xdate1,
                                   min(case when xdate >= sysdate+90 then xdate else null end) xdate2
                              from tab1
                             group by xname, xcode
                          ) t
                    where t1.xname = t.xname
                      and t1.xcode = t.xcode
                      and (t1.xdate = t.xdate1 or t1.xdate = t.xdate2))

  • Multiple select list for one field in form

    Friends,
    I have a form , which is having many fields. One of the field are day/date. In this field i have to take 3 dropdown lists. like one for date, one for day and another for year. I have created three lov's for the day,date and year but for the field day/date i am able to apply only one lov. Any way so that i can display all the three lov for one field
    example
    day/date: day -- (dropdown list)
    date -- (dropdown list)
    year -- (dropdown list)
    thanks in advance
    adi
    Edited by: Adi's on Feb 16, 2010 11:46 PM
    Edited by: Adi's on Feb 16, 2010 11:47 PM
    Edited by: Adi's on Feb 16, 2010 11:52 PM

    nope, I just gave u an example to combime day , date and year fields in one select list, it does not matter whether they are in one table or multiple table and you dont require to create any tables for this, I assumed your lov for day / date / year are dynamic not static.
    Regards,
    Shijesh

  • Single prompt with multiple selection criteria

    I need to build a prompt against a date field; right now this prompt has 'greater than or equal to' criteria.
    Is there a way to show all criterias in a report view (not Edit Query mode or Edit Report) associated with a single prompt?
    this way users will have flexibility to change criteria from 'greater than and equal to' to 'less than and equal to'...etc without going into Edit mode.
    Please advise.

    Hi Ahmed,
    This is a bit of a long shot.
    In the universe, you will need a derived table which has a list of operators.
    SELECT '>' from DUAL
    UNION ALL
    SELECT '<' FROM DUAL
    and base a class/object on it Useful objects, Operators.
    build a prompt on that
    @prompt('Select Operator' 'A', 'Useful objects\Operator', mono...)
    you can then use this it in your calculatin in the report
    if(UserResponse("Select Operator")="<";[val1]-[val2];if(UserResponse("Select Operator")=">";[val2]-[val1];0))
    Let me know if it works

  • Multiple relationship for the same field

    Hello !
    I have this situation :
    Table : Article
    Id
    name
    category
    Table : Services
    id
    name
    nr
    value
    Table : Sell_item
    Id
    item_id
    quantity
    price
    value
    Now the problem is this : The field Item_id on the sell_item table can be the id for  an Article or a Service. So I need to create a double relationship for this field one with Article table an one with Service table.
    Is this possible ?
    If not , or if I'm wrong how can I solve this situation ?
    Thank you.

    Hello,
    Please try the following resource:
    http://stackoverflow.com/questions/10253986/sql-foreign-key-issue-with-2-parent-tables
    The resource offers you 3 options.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to return multiple values in a single field in oracle 10g reports

    I have written a formula column using cursor for loop which returns 3 values. But whenever i am assigning the formula column as the source of a field which is inside a repeating frame the field in only showing the first value returned from the formula column. The rest two values are not shown. Please help what to do.

    User11238124 (please include your name)
    If I understand your issue, you should set the vertical elasticity of the repeating frame to 'Variable' or 'Expand'. It is likely set to 'Fixed'.
    Hope this helps,
    Monty

Maybe you are looking for

  • Deleted Items from External HD Not Appearing in Trash

    I have an iomega external hard drive and have had recent issues trying to trash deleted items. I delete the items and they are removed from the hard drive, but they do not appear in the trash and therefore are unable to be "trashed" so that space is

  • How to create a group including several  roles?

    Hi experts, Hereby a simple question but urgent, that is, how to create a group in portal which includes several roles. For exemple a group for manager contented the roles for managers and another group for employees. Thus it simplifies the role assi

  • Approval Center Preview Updates not displaying a populated Views list

    Goal is to be able to add Baseline fields to Preview Updates. In trying to edit the view in Approval Center other entries ("change the view of Approval center" and "Adding the baseline (tracking) columns to the Approval Center view") indicate the sol

  • Remove left and right margin when display portlets

    What is the best way to remove the left and right margin when display portlets? I found a file called \portalpages\dotnet\prod\src\com\plumtree\portalpages\browsing\myportal\/ MyPortalContentView.cs But I do not see a place for the left and right mar

  • Create Dial Up Connection

    please, How can I create a Dial Up Connection and manage it for Windows 9X, 2000, NT and Millenium? Thank you!!