Report Builder Count Column

How can I build a count column with a where clause based on a query defined in the report builder query screen? From what I can tell the built in count column does not allow the addition or definition of a where clause.
Thanks

Hi Ruth,
Not exactly sure if this will answer your question, but here goes. It sounds like you want to count values based on certain conditions? If the where clause is already in your query, you can use the count function that's available in SQL and allow the database to perform the count for you. Otherwise you can use a formula column in combination with a placeholder column or a summary column to get the conditional count. In the formula column you can use plsql to determine if you want to increment your count or not. Depending on how you do it, you can either just return '1' or '0' from your formula column and create a summary column based on your formula column. Or you can increment a placeholder column from your formula column. If you decide to go with placeholders, I'd suggest reading the online help examples for placeholders as there are a few rules you'll have to go by.
Hope that helps,
Toby

Similar Messages

  • SQL Server Report Builder Hyperlink Column Not Click-able?

    I have a report with a hyperlink column that works in SQL Report Builder 3.0 desktop, but not on the website where it's shown.
    1. 'Website_Domain' field is the shortened URL (domain) is the
    text seen in the Report column
         (technet.microsoft.com)
    2. 'Website_Url' field is the full length URL which is used in the
    'Go to URL' properties
         (http://technet.microsoft.com/en-us/library/ms159106.aspx)
    ['Website Link' Expression]
    =Fields!Website_Domain.Value
    ['Website Link' Column Properties]
    Action = Go to URL
    Selected URL: [Website_Url]

    Hi pointeman,
    I have tried your scenario on my test environment, but the issue was not reproduced. Please take the following steps as a reference:
    Insert Website_Domain field in the detail row, then type the table header with “Website Link”.
    Right-click the cell which contains [Website_Domain] to open Text Box Properties dialog box.
    Click “Action” in the left pane, select “Go to URL” option with [Website_Url] as “Select URL”. 
    The following screenshot is for your reference:
    If the issue still persists, could you please supply more information about the issue? Such as steps you have taken to add the URL or other else. If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Web Layout different in Reports Builder to running in URL

    When I go to Run Web Layout for a report in the Oracle Reports Builder, the columns are formatted differently to when I run the report from a browser (ie. font is smaller and the columns seem to wrap when they seem to fit nicely when running Web Layout in the Reports Builder). In fact, it looks identical to what is shown in the 'paper layout' in the report editor.
    I have used 'desformat=htmlcss', so why does it look different? Can I make the browser version look like what is shown when running Web Layout in the Reports Builder? If so, how?
    Thanks
    Alison

    I am too facing the same problem for quite a long time and left it unresolved. So what i am doing for now is changing the font size and adjusting the paper layout manually.

  • Record Count In report Builder

    Hi Folks,
    In Report Builder I want serial number with each record being fectched from the database in such a way that on each page of the report, the count should always start from 1. Any ideas?
    TIA
    Hassan

    Hi Hassan
    You may have a placeholder column or something and increment its value inside of a repeating frame format trigger.
    You may then reset its value to 1 in BETWEEN_PAGES trigger.
    Hope this helps.
    Regards
    Sripathy

  • How to find the maximum of group sums within a specific column using report builder 3.0

    Hi
    For each part number I am trying to find out in which week of a month did the largest daily shipment occur... so using report builder 3.0
    in SSRS 2012 I can find daily, weekly and monthly totals for the units shipped but I am having a hard time thinking through the logic to find the daily max for each week.
    in my data I can have multiple orders/shipments for the same product on the same day.
    The ultimate goal is to set inventory levels
    So..
    In my matrix report I have
    Row groups:
    Classid => Product class
    InvtID => Item Part Number
    Column Groups:
    FiscYr=> Fiscal Year
    PerPost => Month or period the transaction occurred
    Week_period => the week the transaction occurred
    Day_period => The day that the transaction occurred
    The aggregations are 
    Sum(case_shipped) 
    Max(case_shipped)
    The Sum(case_shipped) is working as desired but the Max(case_shipped) is picking out the max amount shipped on any one order when looking
    at the week, month or fiscal period and that is not what I need.
    I have attached a screenshot since a picture is worth more than my words. I have also included some sample data
    I would very much appreciate any thoughts on this. I am guessing that the solution has something to do with using the inscope function but
    I can't wrap my head around how to use it
    Thank you 
    Tom D
    Here is some sample data for Product A
    Invtid Case_ship Trandate    FiscYr   PerPost   week_period        day_period
    A         10           1/1/2104    2014        1    
              1                           1
    A           3           1/1/2014    2014        1  
                1                           1
    A         50           1/2/2104    2014        1    
              1                           2
    A         30           1/3/2014    2014        1    
              1                           3
    A         20           1/9/2104    2014        1    
              2                           2
    A          5            1/9/2104    2014        1  
                2                           2
    A        20          1/10/2014    2014        1    
              2                           3
    A        60          1/10/2104    2014        1    
              2                           3
    On 1/1/2104 I shipped a total of 13 cases
    On 1/2/2104 I shipped a total of 50 cases
    On 1/3/2104 I shipped a total of 30 cases
    On 1/9/2014 I shipped a total of 30 cases
    On 1/10/2014 I shipped a total of 80 cases
    On 1/9 I shipped a total of 25 cases
    I would like to show that in week 1 the maximum number of cases shipped on any day is 50 (1/2/2014)
    I would like to show that in week 2 the maximum number of cases shipped on any day is 80 (1/10/2104)
    I would also like to show that in perpost (month) 1 the maximum
    number of cases shipped on any day is 80 (1/10/2104)

    Hi
    I was able to find a solution
    I built a new dataset in report builder using the same table as before but tried out the "Group and Aggregate" function and for the case_ship
    field I chose "Sum" as my aggregate.... In essence this gave me a very cool and easy daliy sum of the shipped cases. 
    When I used this new dataset and built my matrix report I was able to easily get the max daily shipment for each product by week, month and
    year.
    Tom

  • Concate column into char in report builder

    Helllo!
    I am working on a report in report builder 6.0.8.27.0 connected to a 10g database.
    In my report i summarize a workers pick performance over a specified period of time on each new row (things like picks, active pick time). Most of the data is summarized using the in-built sum-function in report builder. But i have also a column in my table where i want to concate/aggregate the work zones(physical locations) that a worker has been in over a day.
    A simplified example of how my input query table can look like:
    user | picks | inlogged_time | work_zone
    mav | 100 | 10 | AREA1
    mav | 200 | 30 | AREA2
    ant | 100 | 10 | AREA3
    max | 100 | 10 | AREA3
    This should generate a report that has this structure:
    user | picks | inlogged_time | work_zone
    mav | 300 | 30 | AREA1, AREA2
    ant | 100 | 10 | AREA3
    max | 100 | 10 | AREA3
    My problem is i dont know how to concate the work_zones togheter. I tried using the PL/SQL editor for a function (using vm_concate()), but i could not get it to work and i can't use a new Select statement in my PL/SQL editor because the tables are to large for doing a new query on each row.
    Grateful for any help!
    Regards,
    Martin
    Edited by: 1009483 on 2013-jun-03 08:13

    Hi,
    A small modification to the above query ....
    with data as ( select 'mav' username, 100 picks, 10 inlogged_time, 'AREA1' work_zone from dual union all
    select 'mav' username, 200 picks, 30 inlogged_time,'AREA2' work_zone from dual union all
    select 'ant' username, 100 picks, 10 inlogged_time, 'AREA3' work_zone from dual union all
    select 'max' username, 100 picks, 10 inlogged_time, 'AREA3' work_zone from dual  )
    select username, sum(picks) picks , sum(inlogged_time) inlogged_time , wm_concat(work_zone) work_zone
    from  data
    group by usernameOutput:
    USERNAME,PICKS,INLOGGED_TIME,WORK_ZONE
    'max','100','10','AREA3'
    'mav','300','40','AREA1,AREA2'
    'ant','100','10','AREA3'Regards,
    Archana

  • Report Builder chrashes when creating a new formula column

    Dear all,
    whenever I try to create a new formula column in the data model, that is placed outside of a query, my report builder crashes completely. The same happens on my colleagues notebook.
    If anyone has an idea why this could happen, please let me know. I am currently using Version 9.0.4.1.0.
    Thanks and br
    Daniel

    You can keep the report builder you have now. Just install the new one in new oracle home. You can download it from here
    http://www.oracle.com/technology/software/products/ids/htdocs/904winsoft.html
    This download has Developer Suite 10g (Report 9.0.4.0.33, Form 9.0.4.0.19, JDeveloper, Discoverer, Designer)
    I don't think so you can select which product you want to install, like it was in 6i. So it will install everything.
    Try to install this version. Hope this will help.
    Thanks
    FS

  • Dynamically selecting column names in report builder ???

    Dear members,
    I have a requirement in which the user dynamically selects the tables column names. Like suppose take DEPT table. My query would be
    select &P Report from dept;
    so if the user selects DNAME then i would get the dname values and so on... This is fine but if one gives the value for the lexical parameter as DEPTNO,DNAME then i should get two columns in my report output. The select statement then becomes
    select DEPTNO,DNAME Report from dept;
    But i am not able to do this in report builder(6i). If i use just one value for the parameter then i get the o/p but if i use more than one (eg: DEPTNO,DNAME) then its giving an error.when i run this query through toad or sql plus then i am getting the desired o/p but wher as in report builder i am not able to get the o/p.
    My report triggers are :
    Before Parameter form :
    :P := NULL;
    After parameter Form :
    function AfterPForm return boolean is
    begin
    IF :P = 'DNAME,DEPTNO' THEN
    :P := ' DNAME,DEPTNO ' ;
    ELSE
         :P := NULL;
         END IF;
    return (TRUE);
    end;
    Your comments and suggestions are welcomed.
    thanks
    regards
    sandeep

    Number of columns can not be changed at run time. If your data model has three columns, lexical parameter should pass 3 values. If you have query like this in data model:
    select &p_1 from table
    Whatevere you have as initial value in user parameter p_1, data model captures that info.

  • Hiding empty columns in report builder

    Hi,
    This is my first adventure with report builder and I have
    managed to produce some custom labels which work almost perfectly.
    I say almost because there is one thing I can't seem to do.
    I have a label for addresses. The address data consists of
    data from a query including, name,
    address1,address2,address3,town,county,postcode.
    Some of these are quite often empty but the label still
    displays a line break and the ',' at the end so I might end up
    with:
    Dave Phipps
    27 Acacia Road,
    MyTown,
    MT1 4JP
    In the above address the fields address2, address3 and county
    are empty.
    How do I set this up in Report Builder to hide the missing
    lines so that I would end up with:
    Dave Phipps
    27 Acacia Road,
    MyTown,
    MT1 4JP
    Any ideas?
    Cheers,
    Dave

    Hi,
    If i understood your question correctly,
    The you can try this
    TYPE-POOLS:slis,abap.
    TYPES:BEGIN OF ty,
          f1 TYPE c,
          f2 TYPE c,
          f3 TYPE c,
          f4 TYPE c,
          END OF ty.
    DATA:it TYPE TABLE OF ty,
         wa TYPE ty,
         wa_field TYPE slis_fieldcat_alv,
         i_fieldcat TYPE TABLE OF slis_fieldcat_alv,
         i_details TYPE abap_compdescr_tab,
         wa_comp TYPE abap_compdescr,
         ref_descr TYPE REF TO cl_abap_structdescr,
         lv_field TYPE abap_compname.
    FIELD-SYMBOLS:<fs>,
                  <fs1>.
    ref_descr ?= cl_abap_typedescr=>describe_by_data( wa ).
    i_details[] = ref_descr->components[].
    wa-f1 = 'A'.
    wa-f3 = 'C'.
    APPEND wa TO it.
    wa-f1 = 'X'.
    wa-f3 = 'Y'.
    APPEND wa TO it.
    if it[] is not initial.
    LOOP AT i_details INTO wa_comp.
      ASSIGN wa_comp-name TO <fs>.
      SORT it BY (<fs>) DESCENDING.
      CONCATENATE 'WA' '-' <fs> INTO lv_field .
      ASSIGN (lv_field) TO <fs1>.
        READ TABLE it INTO wa INDEX 1 transporting (<fs>).
      IF sy-subrc = 0 AND <fs1> IS NOT INITIAL.
        wa_field-fieldname = wa_comp-name.
        wa_field-seltext_m = wa_comp-name.
        APPEND wa_field TO i_fieldcat.
      ENDIF.
    ENDLOOP.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = sy-repid
        it_fieldcat        = i_fieldcat[]
      TABLES
        t_outtab           = it[].
    endif.

  • How to compare two column between two datasets in report Builder

    Hello all,
    I have a developed a report which contains two data sets as shown below
    Now i have to match the value of proj_id and ProjectTicketId from
    ds_New   to   project_id and ProjectTicketId in ds_Previous
    and get the respective "Client"  from ds_Previous.
    How can i get the following data in Report builder 3.0
    Thanks in advance.
    Pankaj Kumar Yadav-

    Is that possible to match them via T-SQL, to get one data set?
    SELECT
    Client  from New JIOIN Previous
    ON 
    New.proj_id=Previous.proj_id
    AND New.ProjectTicketId =Previous.ProjectTicketId 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog:
    Large scale of database and data cleansing
    MS SQL Consultants:
    Improves MS SQL Database Performance

  • Report Builder 3.0 2008 R2 - Max Columns - Not Enough Storage

    I have been asked to write a report which uses column grouping. Things seem pretty responsive until i have about 170 columns in the group & I get a the following error:
    System.ComponentModel.Win32Exception: Not enough storage is available to process this command
       at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
       at System.Drawing.BufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
       at System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
       at System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
       at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
       at System.Windows.Forms.Control.WmPaint(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Any idea how I can make this report not not throw an error. I have an embedded datasource using SemanticQuery. Any work around would be helpful (i.e. force a break, max rows /top/, etc)

    Hi bitFlinger,
    As per my understanding, the error message indicates that you are processing a report that has too many (possibly desired, or undesired) results, which ends up running out of memory. 
    In your scenario, there are too many columns in the column group. So we should decrease the columns in the column group. However, from the
    document, we can know that Page breaks are ignored on column groups. So we couldn’t directly add page breaks in a column group. To work around this issue, the following Forum FAQ about "How do I achieve column break in a matrix?" is for your reference:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ea9d795b-8d17-41d2-a1d7-a4069ebb4539/forum-faq-how-do-i-achieve-column-break-in-a-matrix?forum=sqlreportingservices
    If the issue still exists, I think you are probably running out of space on your computer, so you may need to check the space on your c: drive. If you are running out space, you can try to reboot the computer or delete a few things or somehow getting a bigger
    hard drive to check the issue again.  
    Hope this helps.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Report Builder 3.0 Expression i am not able to make it work on Oracle DB Table

    Hi,
    I am newbie to SSRS Report Builder 3.0 so please be patient with me. I am trying to create a report to query Remedy Ticketing System and it uses Oracle Database installed on a Unix OS...My end objective is to do some calculation on the ticket metrics (i.e.
    percentage of tickets closed within SLA, etc) however i am stuck from the very beginning where i am not able to make my expression work...
    To begin with. my query statement...
    Select Distinct TICKET_NUMBER, Assigned_Group, Category, REGION, TICKET_STATUS,EXCEEDED_SLA, TO_CHAR(date '1970-01-01' + (TICKET_CREATION_DATE/60/60/24), 'DD/MON/YYYY HH:MI:SS AM')TICKET_CREATION_DATE
    from ARADMIN.Request
    where (Assigned_Group like 'HOTS' OR Assigned_Group like 'PAID' OR Category like 'HVD%') and TICKET_CREATION_DATE > (TO_DATE('31/DEC/2014 11:59:59 PM','DD/MON/YYYY HH:MI:SS PM', 'NLS_DATE_LANGUAGE=AMERICAN') - DATE '1970-01-01')*60*60*24
    order by ticket_creation_date
    the data type of the oracle table:
    Here is the Query Result of the DataSet:
    Basically Ticket_Status has values from 0 to 4 although from the screenshot above you only see 2 and 4...
    Ticket_Status 0 - Means Open Ticket
    Ticket_Status 1 - Means Work In Progress Ticket
    Ticket_Status 2 - Means Pending Ticket
    Ticket_Status 3 - Means Awaiting Closure Ticket
    Ticket_Status 4 - Means Closed Ticket
    I created a chart column using the expression below but it did not work...what i mean by it does not work is that the chart column output shows all Ticket_Status total count including 0, 1, 2, 3, & 4 (i.e. total count of tickets are 206)...using
    the expression i was only expecting the total count for Ticket_Status 4  (i.e. 180 tickets) but i guess i am doing something wrong with the expression syntax...
    =Count(Fields!TICKET_STATUS.Value=4) 
    i also used the expression below but it did not work...
    =Count(Fields!TICKET_STATUS.Value="4")
    i converted the Ticket_Status to CHAR on the dataset using the TO_CHAR(Ticket_Status) AS Ticket_Status then i tried the expression below but did not work...
    =Count(Fields!TICKET_STATUS.Value="4")
    i tried again the expression below but did not work'
    =Count(Fields!TICKET_STATUS.Value=4) 
    i cannot proceed to the arithmetic calculation if i cannot filter my dataset with the correct value...again i am a newbie with SSRS & report builder and i would appreciate it very much if you can guide/help me :-)

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How Do I Print my reports Horizontally using Coldfusion Report Builder

    Hi-
    I want to print my reports Horizontally rather vertically using Coldfusion Report Builder. I am using a very simple query
    SELECT
          Zones.Zone_id,
          Zones.Zone_name,
         Count(employees.cnic) as Employees
    FROM Zones, Employees
    WHERE Zones.zone_id=Employees.zone_id
    GROUP BY Zones.zone_name
    Or say Daily/Monthly Zone Sale with Zones in Rows and Dates/Months in Columns
    Thanks
    Tayyab Hussain

    Have a look at my response to your post in the Report Builder sub-forum.

  • Report Builder with multiple data series

    I am not able to figure out how to create a bar chart using
    multiple data series in the Report Builder. I can do it with
    explicit CFML coding but not in the Report Builder. I am running MX
    version 7 with the current (as of 9/1/07) download of the Report
    Builder.
    My table contains visit information by site, with standard
    demographics on each visit (age, race, gender, etc.) I am trying to
    analyze the data by site, for example, race by site.
    I am using an SQL statement to sort and group by site &
    race. I can get a chart of the number of visits for each site or
    the total number of visits by race across all sites. But I can't
    get race by site. The SQL statement looks like this:
    SELECT race, site, COUNT(*) as counter
    FROM visit_info WHERE userid = #session.uid#
    GROUP BY site, race ORDER by site, race
    Every variation I have tried for showing race by site either
    leaves out part of the results or creates a bar chart that has the
    race and site categories as separate entities (White, Black,
    Chinese, Site1, Site2, Site3, etc). I've also tried creating a
    combined variable (site_race) but that doesn't seem to fare any
    better.
    Any help would be appreciated.

    Pop,
    Badunit's example is one possible arrangement that you might have described; that is, one column for X values and several columns for Y values. This is the case when you should respond that you are sharing X-values. With all the data in one table, you can select it all at once, so you don't have the problem with dragging additional series into the chart.
    The Numbers User Guide PDF's first chapter is the place to start getting your bearings - you will learn how to distinguish Header vs. Body rows and columns. It's worth the effort to take another look at it.
    Since you are using a Scatter Chart, it's important not to use a header column for X because X values must be Numeric, as opposed to Text.
    Jerry

  • SQL for a report in Reports Builder

    I have a long query that is for all the variables for a report I am building in Reports Builder. So far everything is correct except one column in behaving pretty strangely. For some reason the value in each row is showing up as the same as the value at the bottom of the column which is the column's total. All the values above that should equal the lower value when you add them together.
    What I've got is SUM statements. I figured out what I want the statement to do that's causing the problem I just can't make it do that. I want it to give me a count of how many times one value shows up when another value is equal to a certain value. Here is one line of the code that I've tried to change but SQL keeps giving me errors.
    SUM(case when contract_type = '1' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_1,
    I did change it to COUNT but then it gave me a different incorrect value.

    SELECT component_name||' ( '||component_code||' )' component_code,agency_name||' ( '||agency_num||' )' agency_num,
    COUNT(contract_num_ng) total_cnt,
    SUM(dollars_obligated) total_amt,
    COUNT(case when contract_type = '1' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 end) TOTAL_CNT_1,
    SUM(case when contract_type = '1' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_1,
    SUM(case when contract_type = '2' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_2,
    SUM(case when contract_type = '2' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_2,
    SUM(case when contract_type = '3' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_3,
    SUM(case when contract_type = '3' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_3,
    SUM(case when contract_type = 'A' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_A,
    SUM(case when contract_type = 'A' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_A,
    SUM(case when contract_type = 'B' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_B,
    SUM(case when contract_type = 'B' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_B,
    SUM(case when contract_type = 'J' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_J,
    SUM(case when contract_type = 'J' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_J,
    SUM(case when contract_type = 'K' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_K,
    SUM(case when contract_type = 'K' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_K,
    SUM(case when contract_type = 'L' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_L,
    SUM(case when contract_type = 'L' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_L,
    SUM(case when contract_type = 'M' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_M,
    SUM(case when contract_type = 'M' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_M,
    SUM(case when contract_type = 'R' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_R,
    SUM(case when contract_type = 'R' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_R,
    SUM(case when contract_type = 'S' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_S,
    SUM(case when contract_type = 'S' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_S,
    SUM(case when contract_type = 'T' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_T,
    SUM(case when contract_type = 'T' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_T,
    SUM(case when contract_type = 'U' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_U,
    SUM(case when contract_type = 'U' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_U,
    SUM(case when contract_type = 'V' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_V,
    SUM(case when contract_type = 'V' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_V,
    SUM(case when contract_type = 'Y' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_Y,
    SUM(case when contract_type = 'Y' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_Y,
    SUM(case when contract_type = 'Z' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then 1 else 0 end) TOTAL_CNT_Z,
    SUM(case when contract_type = 'Z' and RPAD(TRIM(' ' from mod_num_ng), 6, '0') = '000000' then dollars_obligated else 0 end) TOTAL_AMT_Z
    FROM contract_actions_dw
    WHERE date_signed BETWEEN :P_DATE_SIGNED_START AND :P_DATE_SIGNED_END
    &P_CRITERIA
    GROUP BY component_name||' ( '||component_code||' )',agency_name||' ( '||agency_num||' )'

Maybe you are looking for

  • IAS 6.0 installation problem on Windows 2000 Server

    I've been trying to install iAS 6.0 Test Driver Service Pack 3, but it just does not seem to be doing anything, installation process shows me a progress bar and returns "successful completion" screen, but really doesn't copy anything to the specified

  • Form in Adobe Reader for Android

    I created a form using Adobe Acrobat Pro XI that my customers fill out and then submit the data to a Filebound site but I when I move the form to my tablet the submit button doesn't work. It gives me no errors and does nothing. Thanks, Jeff White

  • My Mac desktop went offline and printer stopped working

    My Mac desktop went offline and printer stopped working.  I have attempted everything I can do, without luck. When I attempt to reset my belkin router, the mac will not accept my password. My PC, set up 3" away, is online. HELP

  • Is there a Fill Flash in PSE 3?

    Is there a fill flash tool in Elements 3, for some reason I have not been able to locate it. Thank you

  • Task form error - null pointer

    I am experimenting with 11.1.1.4 using a very simple scenario: Process: none start > initiator user task ("submit form") > simple user task ("approve/reject") > .... Auto-generated forms with one parameter based on process object (based on business o