Row Grouping

Hi All,
I have an IR and I am trying to do 'Row Grouping'. I worked on 'Column Grouping' before installing a plug-in 'IR Column Groups'
I am trying to get the same for rows.
PASS
COMPLETE
FAIL
NOT COMPLETE
'COMPLETE','NOT COMPLETE' are the values of Column1.
'PASS', 'FAIL' are the values of Column2.
Is this possible? Please give me some inputs.
I am using 10g DB, Apex 4.1
Thank you all in Advance,
Daniel
Edited by: Daniel on Jun 5, 2012 12:10 PM

Daniel,
Maybe I am not quite understanding the post. If you want the rows grouped, and you are using an Interactive Report, you do not need any plugin.
Just run your report. Click the Actions drop down and the select Format...Control Break. In the resulting dialog, select Column 1 and then Column 2. Your rows will be grouped.
-Joe
Edited by: Joe Upshaw on Jun 6, 2012 5:55 AM

Similar Messages

  • Calculate percentage between two rows in a matrix report with a single row group in SSRS 2008

    I need your help. I have a matrix report in ssrs 2008. The report contain one field value column and one value column. I need to calculate a percentage for two values. For example : row 1 : Discount 10 Row 2 : Sales 100 Result : 10/100. I have only one
    row group, I need to have a condition where Field = Discount % on Revenue then Discount/Total Turnover. Because of the  grouping for total, I am not being able to calculate the %, its just totalling the % discount. Kindly refer to the snapshot of the
    report.

    Hi Thanks a lot for your answer, but unfortunately it didn't work,the report is reading from a stored procedure which I have unpivot to convert all columns into rows, so that's why Discount % on Revenue, Discount and Total Turnover is found in one column.
    So the Field!Col.Value is the Discount % on Revenue, Discount and Total Turnover. I have tried to change the code to
    "=SUM(IIF(Fields!Col.Value = "Discount",Fields!value.Value),0))
    /IIF(SUM(IIF(Fields!Col.Value = "Turnover Total",Fields!value.Value),0)) = 0 ,
    Nothing,SUM(IIF(Fields!Col.Value = "Turnover Total",Fields!value.Value),0)))" but to no avail. Any other suggestion will be most welcome.
    Thanks.
    If everything you're getting from stored procedure then you need to calculate and bring the value from there itself.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Diplaying matrix with drill down (toggle visibility) enabled for 4 row groups

    Hello,
    I have a matrix in SSRS 2012 with 4 row groups representing a product hierarchy.   Product Sub Group, Product, Sub Product and Account Number are the levels of the hierarchy.  I have enabled drill down (toggle item visibility) on the first
    3 of these levels. 
    This works great, but my matrix is very wide when it is first rendered.  Ideally I want my matrix to expand horizontally as I expand/drill down into each grouping.  So when the report is first rendered, and 3 of the groups are invisible, the
    matrix will be thin.  Is this possible?
    Thanks,
    Gabe

    Hi Gabe,
    Based on my test, it cannot achieved in SQL Server Reporting Services (SSRS).
    We can hide these column contents in matrix, however, we cannot hide the space in the report. In this situation, I recommend you use table to display these data.
    Alternative, we can add a drill-down in the column group to hide the column group when it is first rendered. Please refer to the following screenshot:
    If you have any questions, please feel free to let me know.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Split Column group heading to next row based on row group

    Hii all 
    I am developing a matrix by grouped departments on row and schemes are in columns
    but scheme group goes to end .. its not meeting my requirement 
    as per above image my report should looks like. 
    but report looks like below ..
    Dilip Patil..

    Hi Dilip Patil,
    According to your description, you want to create a matrix which display schemes of departments. Now you can't make the matrix looks like the first image above. Right?
    In this scenario, you should have a data field in your dataset which is for the schemes to group on. Otherwise the matrix can't dynamically generate those schemes into on row. If you don't have a column in your database to group the schemes,we suggest you
    use table the render your data and put the schemes into detail rows. We have tested in our local environment. Here are steps and screeenshots for your reference:
    1. We add a column(named Scheme) in database to define scheme group for schemes.
    2. Put Dept into row group and set it group on Govt. The design looks like below:
    3. Save and preview. It looks like below:
    Reference: 
    Exporting Reports (Report Builder and SSRS)
    Matrices (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Simon Hou

  • Cross tab template Formatting. Two Row Groups cannot be on the same line

    Hi
    I have a cross tab template(Vetsriselvan favor) where it has Multiple Row groups. In the RTF template I want them to be on the same line but somehow it works only if they are one below the other. In this template Comp is the First Group Row then Acct is 2nd Group Row and Expense is the 3rd Group Row. Period is the Column. I want all the Group rows start from the same line instead one below the other. Is it possible to do it?
    Comp Acct Expense Period
    <?for-each-group:/BIOFASPRJ/LIST_G_SUMDEPR1PERACCT/ <[?for-each-group@column:G_PERIOD_NAME[./PERIOD_NAME!=''];PERIOD_NAME|mailto:?for-each-group@column:G_PERIOD_NAME[./PERIOD_NAME!=''];PERIOD_NAME]?>
    G_SUMDEPR1PERACCT/LIST_G_COMP_CODE/G_COMP_CODE;./COMP_CODE?> F_comp
    <?for-each-group:./LIST_G_ACCT/G_ACCT [LIST_G_DESCRIPTION/G_DESCRIPTION/LIST_G_PERIOD_NAME/G_PERIOD_NAME/LIST_G_DEPR1/G_DEPR1];ACCT?> <?variable@incontext:G1;current-group()?>acc
    <?for-each-group:./LIST_G_DESCRIPTION/G_DESCRIPTION[LIST_G_PERIOD_NAME/G_PERIOD_NAME/LIST_G_DEPR1/G_DEPR1];DESCRIPTION?><?variable@incontext:G2;current-group()?>acc

    Upload the template here
    http://apps2fusion.com/forums/viewforum.php?f=60
    or
    Send me the template and xml to fusionDOTobjectATgmail.com

  • Using same tablix column for 2 row groups

    Hi.  We run 2012 enterprise.  My tablix is grouped (for the most part) by hidden primary (values are 5,10,15,20) , secondary and tertiary sort columns.  And a couple of visible label items that are aligned left.
    Every row's data columns are completely %, $ or numerically formatted depending on a hidden helper field i've snuck into the tablix row group data fields after the tertiary sort.
    The primary sort column does equate to a label that I dont show right now.  In biz terms that label is actually the highest from a grouping standpoint but isnt being used right now for anything.  I left it for last.
    As I put the finishing touches on this report, I'd like to display that label ahead of the 4 sections it represents using the same column being occupied by the 1st (leftmost) label that is currently visible.  I'd like to center it in that column on
    its own row and apply some shading to the cells to its right.   And show nothing in those shadded cells.   All without changing my dataset if possible.
    To complicate things, I'd like to follow each of the 4 sections with a completely shaded row.  No data at all but grid lines can show thru shading.   Again without changing my dataset.  Is there a feature in ssrs that deals with this
    kind of visual nuance?

    Hi Jeewan,
    Try this formula, If I understood your question correctly it will work for you.

  • Drill Down only the Middle Row in the Row Group

    Friends,
    I am having difficulties in implementing drill down for one row group.  This is my requirement.
    The Dataset would be returning say the following columns - Eg, Account #, Admit Date, Discharge Date, Pend Reason, Pend Date, Total Amount, Comments. An Account can be pended multiple times.
    We can Pend an Account multiple times. Hence if multiple records exist only the Pend Reason & Pend Date fields would be different for each row for a account. So Account, Pend Reason, Pend Date form a UNIQUE key.
    I am trying to create a drill down report. I want to drill down the Pend Reason & Pend Date fields. This is possible. However, the requirement is to display the Pend Reason & Pend Date fields in the middle of the result set i.e. Total Amount, Comments
    field would be coming after these fields in the report. So whenever i try to expand/collapse the subsequent fields Total Amount & Comments too get expanded/collapsed.
    I am able to achieve this if i keep Pend Reason & Pend Date fields at the end of the result set. But that is not the requirement.
    There is another option of creating sub report for these fields and displaying the history. However i feel that this would be very time consuming since the sub report would be called for every row in the result set.
    Are there any other ways to achieve this? Is it possible to drill down these 2 fields by toggling these same 2 fields?
    Any help would be appreciated.
    Thanks.
    Murali Krishnan

    Hi Murali,
    Thank you for your post.
    Since I am not very clearly about your requirement, could you please post the dataset with sample data, and the screenshot about your report design? It is benefit for us to do further analysis.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support
    Alisa,
    Thanks for responding. I am attaching the report layout. In this Facility, User, CaseType have been grouped and rest of the fields are in Details section.
    For an account with multiple entries in the dataset only the Pend Reason would be different. All the other fields would be the same. When I try to add all the fields before Pend Reason field as Parent, it is grouping till Pend Reaosn and showing even Pend
    Date, Pend Days fields in individual rows.
    Our requirement is to have only one row per account in the report and display multiple rows for pend reasons in its own box. for eg if there are 3 rows for account 111
    Col1, Col2, Col3
    111, A, 20
    111,B,20
    111,C,20
    My requirement is to display like below.
    111
    A
    20
    B
    C
    i know the we can implement this by using a subreport for COl2. but it would be time consuming as it would be called for all the rows. Is there any other better options.
    Murali Krishnan

  • WebDynpro Table Simple Row Group

    Hello.
    How to create a table Grid with simple Row Group with this structure ?
    COMPANY   |   CONTACTS
        Cp1          John
                     Jimmy
                     Michael
        Cp2   |      Louis
                     Taylor
                     Michel
        Cp3   |      Dave
                     Kelly
                     Harry
    Is not a Tree view in Table ...I need only grouped rows expanded in a table.
    Thanks in Advance.
    Taylor
    Edited by: Taylor on Jul 29, 2010 10:56 AM

    Hi Taylor,
    Try This:
    1.Create a Context node with Following Structure:
       TableNode
    __Attr1
    __Attr2
        |__Attr3
    You'll have the number of attributes based on your requirement
    Fill the elements in the node.
    Here we want to group the rows based on Attr1 value
    2.Create a table with DataSource = TableNode
    3.Add a TableColumnGroup in the table Say TableColumnGroup1.
    4.Add 3 ( 3 in this example otherwise based on your requirement) columns say Colum1,Column2,Column3 in this Grouped column with TableCellEditors' values bound to the attributes in the TableNode respectively.
    5.Select the Column1 (column used for Attr1) and bind its groupingValue propety to TableNode->Attr1
    When you deploy, it will display the rows Grouped by the Value in Attr1.
    Regards,
    Ajay

  • Totalling at intervals in row grouping

    dear techine,
                        i m working on an application wherein i need to sum up a field at regualr intervals in row grouping,as inafter every group i need to display the total of a field.
    please send me the totalling logic as well as some technique by which i can display the total at intervals....

    Hi Natasha,
        Thanks for the  suggestion.
    I have found the simplest  way to do it. just need to provide implementation  of groupLabelFunction of ADG
    ie
    <mx:AdvancedDataGrid id="adg"    groupLabelFunction="addChildCount">
        private function addChildCount(data:Object,column:AdvancedDataGridColumn):String
           //get the groupingCollection to get access to the group label property name
            var grp:IGroupingCollection = tradeList.dataProvider.source as GroupingCollection2;
            var grpLabelProperty:String = grp.grouping.label;
            //get child count for the group
            // this uses the fact that IHierarchicalData supplied as dataProvider to ADG gets
            // converted to a IHierarchicalCollectionView. This converts all children to ICollectionViews if they are not already.                   
            var childCount:int = tradeList.dataProvider.getChildren(data).length;
            return data[grpLabelProperty] + "(" + childCount + ")";
    Thats it ...
    Hope this will help someone ..

  • Row Grouping in Excel through ABAP OLE

    Hi Experts,
    I am downloading some ALV report output using OLE with different formatting. The downloaded file has to show data
    in the grouping format.
    For example;
    Interanl table contains fields : Customer Number and sales Order, Amount,
    Customer Number sales Order Amount
    1000                     120000001   3000.30
    1000                     120000002   3400.00
    1001                     122000001   2000.00
    1001                     122000002   3440.00
    After it downloaded the Excel should contains only two line(by dfaultt)
    +    1000                120000001  3000.30
    +    1001                 122000001 2000.00
    When you click on symbol(+)  then hidden rows will shown.
    We can do it in Excel by using Group. Just select few rows(row number 1 to 5) and then go to
    DATA->GROUP AND OUTLINE->GROUP.
    Then u will see one line for the selected rows.
    Can anybody tell me how to achieve it through OLE in ABAP. Your inputs are highly needed for me. Thank you so mush!
    Regards,
    Meera.

    We can do it,  Can anybody tell me OLE Mehod which should I use in the reprot?

  • Ranking for Row grouping in SSRS report

    Hi,
    I want to display data in following format in ssrs report. 
    Rank Group  Value
    1        G1      10
    2        G1      20
    3        G1      30
    4        G1      40
    1        G2      25
    2        G2      54
    3        G2      64
    I tried row count and other ranking functions but it did not working.
    Please help.
    Thanks,
    Vivek Singh

    Hi,
    You can Try Rank  , Dense Rank and Row Number Based on Your Requirements.
    Because these three having Different functionality
    Row number will returns unique values .
    Rank is similar to Row number , except equal rows are ranked same
    Dense Rank similar to Rank but it will not give any gapes.
    select a.[group],a.value,RANK() over (partition by [Group] order by value)Rank1 from [msdn.rank] a
    select a.[group],a.value,Dense_rank() over (partition by [Group] order by value)Rank1 from [msdn.rank] a
    select a.[group],a.value,Row_number() over (partition by [Group] order by value)Rank1 from [msdn.rank] a
    GVRSPK VENI

  • ORA-01427:single-row sub query returns more than one row (group by)

    Hello every one, I am very new to this field , and Right now I am working with this sql, where BEG_BAL_WKST,WKST_RECEIVED_NUM,WKST_PROCESSED_NUM,WKST_CANCELED_NUM are needs to be grouped by,but I am getting the "single-row sub query returns more than one row".
    This is the query I am using in my source qualifier:
    select
    SUM(tmp.WIP_TO_BILL_LOC_AMT) AS WIP_TO_BILL_LOC_AMT,
    sum(tmp.REALIZATION_LOC_AMT) AS REALIZATION_LOC_AMT,
    SUM(tmp.NEG_REAL_LOC_AMT) AS NEG_REAL_LOC_AMT,
    sum(tmp.POS_REAL_LOC_AMT) AS POS_REAL_LOC_AMT,
    sum(tmp.BILL_IN_ADVANCE_LOC_AMT) AS BILL_IN_ADVANCE_LOC_AMT,
    sum(tmp.CARRY_FORWARD_LOC_AMT) AS CARRY_FORWARD_LOC_AMT,
    sum(tmp.BILL_TO_CLIENT_LOC_AMT) AS BILL_TO_CLIENT_LOC_AMT,
    sum(tmp.REMAIN_WIP_TO_BILL_LOC_AMT) REMAIN_WIP_TO_BILL_LOC_AMT,
    sum(tmp.AR_INV_AMT) AS AR_INV_AMT,
    sum(tmp.AR_TAX_AMT) AS AR_TAX_AMT,
    tmp.BEG_BAL_WKST_NUM AS BEG_BAL_WKST_NUM,
    tmp.WKST_RECEIVED_NUM AS WKST_RECEIVED_NUM,
    tmp.WKST_PROCESSED_NUM AS WKST_PROCESSED_NUM,
    tmp.WKST_CANCELED_NUM AS WKST_CANCELED_NUM,
    tmp.DURATION AS DURATION,
    tmp.NUM_DAYS AS NUM_DAYS,
    tmp.NUM_HOURS AS NUM_HOURS,
    tmp.NUM_MINUTES AS NUM_MINUTES,
    tmp.NUM_SECONDS AS NUM_SECONDS,
    tmp.LEAD_PROJECT_OFFICE_CODE AS LEAD_PROJECT_OFFICE_CODE,
    tmp.LEAD_PROJECT_TEAM_CODE AS LEAD_PROJECT_TEAM_CODE,
    tmp.ORG_ID AS ORG_ID,
    tmp.RPT_DATE AS RPT_DATE,
    tmp.RPT_DATE_WID AS RPT_DATE_WID,
    tmp.LOCAL_CURR_CODE AS LOCAL_CURR_CODE,
    tmp.USD_EXCH_RATE AS USD_EXCH_RATE,
    tmp.EUR_EXCH_RATE AS EUR_EXCH_RATE,
    tmp.GBP_EXCH_RATE AS GBP_EXCH_RATE
    from(
    SELECT
    WIP_TO_BILL_LOC_AMT as WIP_TO_BILL_LOC_AMT ,
    REALIZATION_LOC_AMT AS REALIZATION_LOC_AMT,
    NEG_REAL_LOC_AMT AS NEG_REAL_LOC_AMT ,
    POS_REAL_LOC_AMT AS POS_REAL_LOC_AMT,
    BILL_IN_ADVANCE_LOC_AMT AS BILL_IN_ADVANCE_LOC_AMT ,
    CARRY_FORWARD_loc_AMT AS CARRY_FORWARD_LOC_AMT,
    bill_to_client_LOC_AMT AS BILL_TO_CLIENT_LOC_AMT ,
    REMAIN_WIP_TO_BILL_LOC_AMT AS REMAIN_WIP_TO_BILL_LOC_AMT,
    AR_inv_AMT AS AR_INV_AMT,
    ar_tax_amt AS AR_TAX_AMT,
    (SELECT count(distinct(RPAD(INTEGRATION_ID,32)))
    FROM wc_twfs_olb_invoice_history_f
    WHERE ((inv_status_type='FIN'AND inv_status_code NOT IN ('COMPLETE','PROCESSED'))
    OR (inv_status_type='WS' AND inv_status_code NOT IN ('PRC'))) --COMPLETED
    AND to_char((sysdate-5),'YYYYMMDD') between to_char(status_start_dt,'YYYYMMDD') and to_char(status_end_dt,'YYYYMMDD')group by rpad(integration_id,32)) AS BEG_BAL_WKST_NUM ,
    (SELECT count(distinct(RPAD(INTEGRATION_ID,32)))
    FROM wc_twfs_olb_invoice_history_f
    WHERE (inv_status_code='NEW')
    AND to_char((sysdate-4),'YYYYMMDD') between to_char(status_start_dt,'YYYYMMDD') and to_char(status_end_dt,'YYYYMMDD')group by rpad(integration_id,32))AS WKST_RECEIVED_NUM ,
    (SELECT count(distinct(RPAD(INTEGRATION_ID,32)))
    FROM wc_twfs_olb_invoice_history_f
    WHERE ((inv_status_type='FIN' and inv_status_code IN ('COMPLETE','PROCESSED'))
    OR (inv_status_type='WS' AND inv_status_code IN ('PRC'))) --COMPLETED
    AND to_char((sysdate-4),'YYYYMMDD') between to_char((status_start_dt),'YYYYMMDD') and to_char((status_end_dt),'YYYYMMDD')group by rpad(integration_id,32))AS WKST_PROCESSED_NUM ,
    (SELECT count(distinct(RPAD(INTEGRATION_ID,32)))
    FROM wc_twfs_olb_invoice_history_f
    WHERE (inv_status_type='FIN' AND inv_status_code='CANCELLED')
    AND to_char((sysdate-4),'YYYYMMDD') between to_char((status_start_dt),'YYYYMMDD') and to_char((status_end_dt),'YYYYMMDD')group by rpad(integration_id,32)) AS WKST_CANCELED_NUM,
    DURATION AS DURATION,
    NUM_DAYS AS NUM_DAYS,
    NUM_HOURS AS NUM_HOURS,
    NUM_MINUTES AS NUM_MINUTES,
    NUM_SECONDS AS NUM_SECONDS,
    lead_project_office_code AS LEAD_PROJECT_OFFICE_CODE,
    lead_project_team_code AS LEAD_PROJECT_TEAM_CODE,
    org_id AS ORG_ID,
    trunc(sysdate-1) AS RPT_DATE,
    to_char((sysdate-1),'YYYYMMDD') AS RPT_DATE_WID,
    --last_day(a.report_date) mth_end_dt,
    LOC_CURR_CODE AS LOCAL_CURR_CODE,
    usd_exch_rate AS USD_EXCH_RATE,
    eur_exch_rate AS EUR_EXCH_RATE,
    gbp_exch_rate AS GBP_EXCH_RATE
    FROM Wc_twfs_olb_invoice_history_f
    Where
    RPT_DT_MCAL_PERIOD_WID =(select max(RPT_DT_MCAL_PERIOD_WID)from Wc_twfs_olb_invoice_history_f))tmp
    group by BEG_BAL_WKST_NUM,WKST_RECEIVED_NUM,WKST_PROCESSED_NUM,WKST_CANCELED_NUM,DURATION,NUM_DAYS,NUM_HOURS,NUM_MINUTES,NUM_SECONDS,
    LEAD_PROJECT_OFFICE_CODE,LEAD_PROJECT_TEAM_CODE,ORG_ID,RPT_DATE,RPT_DATE_WID,
    LOCAL_CURR_CODE,USD_EXCH_RATE,EUR_EXCH_RATE,GBP_EXCH_RATE;
    Can you please suggest me what to do next, and what would be the solution to this.
    Thanks a lot in advance. please show me some direction.

    you may want to change it something like
    SELECT SUM(Wip_To_Bill_Loc_Amt) AS Wip_To_Bill_Loc_Amt,
           SUM(Realization_Loc_Amt) AS Realization_Loc_Amt,
           SUM(Neg_Real_Loc_Amt) AS Neg_Real_Loc_Amt,
           SUM(Pos_Real_Loc_Amt) AS Pos_Real_Loc_Amt,
           SUM(Bill_In_Advance_Loc_Amt) AS Bill_In_Advance_Loc_Amt,
           SUM(Carry_Forward_Loc_Amt) AS Carry_Forward_Loc_Amt,
           SUM(Bill_To_Client_Loc_Amt) AS Bill_To_Client_Loc_Amt,
           SUM(Remain_Wip_To_Bill_Loc_Amt) AS Remain_Wip_To_Bill_Loc_Amt,
           SUM(Ar_Inv_Amt) AS Ar_Inv_Amt,
           SUM(Ar_Tax_Amt) AS Ar_Tax_Amt,
           COUNT(DISTINCT CASE
                   WHEN ((Inv_Status_Type = 'FIN' AND
                        Inv_Status_Code NOT IN ('COMPLETE', 'PROCESSED')) OR
                        (Inv_Status_Type = 'WS' AND Inv_Status_Code NOT IN ('PRC'))) --COMPLETED
                        AND To_Char((SYSDATE - 5), 'YYYYMMDD') BETWEEN
                        To_Char(Status_Start_Dt, 'YYYYMMDD') AND
                        To_Char(Status_End_Dt, 'YYYYMMDD') THEN
                    Rpad(Integration_Id, 32)
                 END) AS Beg_Bal_Wkst_Num,
           /*(SELECT COUNT(DISTINCT(Rpad(Integration_Id, 32)))
              FROM Wc_Twfs_Olb_Invoice_History_f
             WHERE ((Inv_Status_Type = 'FIN' AND
                   Inv_Status_Code NOT IN ('COMPLETE', 'PROCESSED')) OR
                   (Inv_Status_Type = 'WS' AND Inv_Status_Code NOT IN ('PRC'))) --COMPLETED
               AND To_Char((SYSDATE - 5), 'YYYYMMDD') BETWEEN
                   To_Char(Status_Start_Dt, 'YYYYMMDD') AND
                   To_Char(Status_End_Dt, 'YYYYMMDD')
             GROUP BY Rpad(Integration_Id, 32)) AS Beg_Bal_Wkst_Num,
           (SELECT COUNT(DISTINCT(Rpad(Integration_Id, 32)))
              FROM Wc_Twfs_Olb_Invoice_History_f
             WHERE (Inv_Status_Code = 'NEW')
               AND To_Char((SYSDATE - 4), 'YYYYMMDD') BETWEEN
                   To_Char(Status_Start_Dt, 'YYYYMMDD') AND
                   To_Char(Status_End_Dt, 'YYYYMMDD')
             GROUP BY Rpad(Integration_Id, 32)) AS Wkst_Received_Num,
           (SELECT COUNT(DISTINCT(Rpad(Integration_Id, 32)))
              FROM Wc_Twfs_Olb_Invoice_History_f
             WHERE ((Inv_Status_Type = 'FIN' AND
                   Inv_Status_Code IN ('COMPLETE', 'PROCESSED')) OR
                   (Inv_Status_Type = 'WS' AND Inv_Status_Code IN ('PRC'))) --COMPLETED
               AND To_Char((SYSDATE - 4), 'YYYYMMDD') BETWEEN
                   To_Char((Status_Start_Dt), 'YYYYMMDD') AND
                   To_Char((Status_End_Dt), 'YYYYMMDD')
             GROUP BY Rpad(Integration_Id, 32)) AS Wkst_Processed_Num,
           (SELECT COUNT(DISTINCT(Rpad(Integration_Id, 32)))
              FROM Wc_Twfs_Olb_Invoice_History_f
             WHERE (Inv_Status_Type = 'FIN' AND Inv_Status_Code = 'CANCELLED')
               AND To_Char((SYSDATE - 4), 'YYYYMMDD') BETWEEN
                   To_Char((Status_Start_Dt), 'YYYYMMDD') AND
                   To_Char((Status_End_Dt), 'YYYYMMDD')
             GROUP BY Rpad(Integration_Id, 32)) AS Wkst_Canceled_Num,*/
           Duration AS Duration,
           Num_Days AS Num_Days,
           Num_Hours AS Num_Hours,
           Num_Minutes AS Num_Minutes,
           Num_Seconds AS Num_Seconds,
           Lead_Project_Office_Code AS Lead_Project_Office_Code,
           Lead_Project_Team_Code AS Lead_Project_Team_Code,
           Org_Id AS Org_Id,
           Trunc(SYSDATE - 1) AS Rpt_Date,
           To_Char((SYSDATE - 1), 'YYYYMMDD') AS Rpt_Date_Wid,
           --last_day(a.report_date) mth_end_dt,
           Loc_Curr_Code AS Local_Curr_Code,
           Usd_Exch_Rate AS Usd_Exch_Rate,
           Eur_Exch_Rate AS Eur_Exch_Rate,
           Gbp_Exch_Rate AS Gbp_Exch_Rate
      FROM Wc_Twfs_Olb_Invoice_History_f
    WHERE Rpt_Dt_Mcal_Period_Wid =
           (SELECT MAX(Rpt_Dt_Mcal_Period_Wid)
              FROM Wc_Twfs_Olb_Invoice_History_f)
    GROUP BY Beg_Bal_Wkst_Num,
              Wkst_Received_Num,
              Wkst_Processed_Num,
              Wkst_Canceled_Num,
              Duration,
              Num_Days,
              Num_Hours,
              Num_Minutes,
              Num_Seconds,
              Lead_Project_Office_Code,
              Lead_Project_Team_Code,
              Org_Id,
              Rpt_Date,
              Rpt_Date_Wid,
              Local_Curr_Code,
              Usd_Exch_Rate,
              Eur_Exch_Rate,
              Gbp_Exch_Rate;Edited by: 986006 on Mar 4, 2013 1:08 PM

  • Adding Dynamic rows(group of html controls).

    Hi!
    I need to add group of HTML fields i.e., textboxes,dropdown, radio buttions by clicking a button on to the existing JSP Page.
    The sample page as "http://www.rj2t.com/test/deca/advisors/sec_form.asp". I also need to accept the data and print them to another JSP from these dynamically generated fields.
    Please help.!!!!

    The sample page you provided reloads when the rows are requested.
    This posts a number in the <textfield name="examplename"> field, the method being POST (there is no query string). The form target in the sample page is itself. When it loads with no 'examplename' parameter passed to it, 20 rows are outputed, then it reloads itself with the value given in the textfield when the submit ("Generate Lines") button is clicked
    The JSP would then use a loop such as
    int numberOfRows=20;
    try{numberOfRows=Integer.parseInt(HttpServletRequest.getParameter("examplename")}
    catch (NumberFormatException exc){}//this is one of the few circumstances where the exception can be
                    //consumed as the variable is still 20 if the 'examplename' parameter is null or unparsable;
    for (int loop=0 ; loop<numberOfRows ; loop++)
      //the HTML for a single row of form fields goes here;
    }

  • SQL Tuning for 50 million rows--- Group by

    For example i have 50 million+ rows in a table with columns Customer_ID, Order_ID and trans_date. I need a query to return customers with more than 2 orders over the past 60 days.
    [sql]
    Select customer_id from table
    where trans_date between sysdate-60 and sysdate
    group by customer_id
    having count(customer_id)>=2
    [/sql]
    I am trying to understand if there is a fastest alternative for group by and having. Especially for large data sets. Thanks in advance for your help/suggestions.

    varun wrote:
    For example i have 50 million+ rows in a table with columns Customer_ID, Order_ID and trans_date. I need a query to return customers with more than 2 orders over the past 60 days.
    [sql]
    Select customer_id from table
    where trans_date between sysdate-60 and sysdate
    group by customer_id
    having count(customer_id)>=2
    [/sql]
    I am trying to understand if there is a fastest alternative for group by and having. Especially for large data sets. Thanks in advance for your help/suggestions.
    The first task is to write a query that actually works properly; that one doesn't. Your business rule was 'more than 2 orders' but that query uses '>=2'.
    And there is NOTHING in that query having anything to do with 'orders'.
    That query returns 'customers with two or more rows' in the last 60 days. Why aren't you using 'ORDER_ID' in the query?
    First write a query that returns the correct results. There is no need for an alternative unless you can demonstrate that the query actually HAS a performance problem.

  • Trouble Keeping Merged and Unmerged Rows Grouped when Filtering

    Hi-
    In my screen shot below, I wish to keep the unmerged cells in columns F-I grouped with the merged cells in columns B-E and J-L when filtering. Essentially, I would like for everything in Example 1 to stick together, and everything in Example 2, and so on
    and so forth. Currently, when I filter by any of the given fields, only the first row of the unmerged cells filters with it (in this example, rows #4 and #12). Is there a way to have all of these rows stay static with the merged cells? Please note that I wish
    for this spreadsheet to be dynamic in that you can filter by any of the given fields, not just Field #1.
    Thanks!
    Lindsay

    When you merge multiple cells, only the upper-left cell has content, the content of other cells are blank. So in your case, when you filter these fields ,only the first row will appear. And we can't change this, it is just a built-in feature of excel.
    There are some workarounds you can have a try:
    1. Add the help columns ,if you want to filter all of these fields, you may need to add multiple help columns. Then filter by these help columns.
    2. Fill these merged cells with colors ,then filter by the specific color.
    3. Create a PivotTable ,and then filter inside the pivotTable.
    Wind Zhang
    TechNet Community Support

Maybe you are looking for