Grouping by specified order question

I have CRXI. I have a group by specified order setup discarding others. In the page header I want to count all data, including the items I have discarded that don't meet the group parameters without displaying them. How would I accomplish this.
Ralph

You can statically add the where clause like this
(select count(`Customer`.`Country`) from `Customer` where `Customer`.`Country`='USA')
but unfortunately SQL Expressions doesn't support formula fields and parameter fields in it.
Regards,
Raghavendra

Similar Messages

  • Specified Order Grouping does not show if Distinct Count is Zero

    Post Author: Hieu
    CA Forum: General
    Hello,
    I'm using Crystal Reports XI R2 with SQL data source. I have a cross-tab report with grouping in specified order. It's a report of applicants applying to a college. The grouping is of various majors (degrees). The report summarizes (distinct counts) the number of applicants for the groups of majors. The problem is that if the count for a group of major is zero, then that Named Group does not appear at all in the cross-tab report. I want the Name Group to appear with the count of "0".
    I notice this same phenomenon with specified order grouping anywhere and not just in a cross-tab. I have tried changing "convert database/other null values to default" but nothing working yet.
    Any help will be most appreciated. Thanks.

    Post Author: synapsevampire
    CA Forum: General
    It's not a phenomenon, it's how databases and SQL works.
    You didn't get any rows back for those with a zero distinct count (otherwise the count would be 1 or more, right?), so Crystal doesn't show any data for those groups.
    So to display a zero for those that do not exist would reuire either advanced SQL, or manual summaries.
    One method for manual summaries is to use Running Totals. Select distinct count of the applicants and group by the majors, then in the evaluate use a formula place:
    {table.majors} = "Blah 1"
    Creating a seperate Running Total for every group and replacing "Blah 1" with the various majors.
    -kai

  • Specified Order problem

    Greetings;
    I'm having a problem with "Group Options" "Specified Order", it is limiting me to displaying only few of the groups I created, is ther an explanation to that.
    Thanks

    Please note that if the earlier group contains the data with some condition and the latter group is also a subset of the previous group then that specified group will not be printed.
    for example if you have a group A with condition is between A to H
    and the other group B with condition is between C to E
    then Group B will not be shown in the group tree
    Regards,
    Raghavendra

  • Can implement the function of  "specified order " in other way?

    Version:CR2008
    usually we do ti like this:
    select :change group-->in specified order,then New a group ,and New some conditions.
    When having more then 20 specified group ,and each specified group have more then 10 conditions,this work then takes a lot of time and become hard to maintain.
    can it be implement by coding or other ways?
    thanks a lot.

    You may be able to use a formula with a Select/Case to define your group names.  After that you could use the Specified order on the resulting groups.  Here's an example I use to group minor offices into major offices:
    Select({MR0017E.OFF_DESC})
    Case "DDO":"DDO"
    Case "LDO":"LDO"
    Case "PDO":"PDO"
    Case "Pville One Stop CWS":"PDO"
    Case "PDC-Prof Dev Center":"PDC"
    Case "Visalia Adult Clinic":"TCS"
    Case "Hillman Hlth. Center":"TCS"
    Case "Hillman Annex":"TCS"
    Case "Mental Health Vis.":"TCS"
    Case "Dinuba Health Clinic":"TCS"
    Case "Vis. Health Clinic":"TCS"
    Case "Fam Hlth Care Netwk":"TCS"
    Case "KDH":"TCS"
    Case "Tulare District Hosp":"TCS"
    Case "Porterville Clinic":"TCS"
    Case "Sierra View Hospital":"TCS"
    Case "Pville Fam Hlth Ca":"TCS"
    Case "Lindsay Hlth Center":"TCS"
    Case "TWORKS Cherry St.":"TCS"
    Case "Ivanhoe FHCN":"TCS"
    Case "Goshen FHCN":"TCS"
    Case "Woodlake FHCN":"TCS"
    Case "Cutler / Orosi FHCN":"TCS"
    Case "Tulare Health Clinic":"TCS"
    Case "TDO":"TDO"
    Case "Tulare CWS":"TDO"
    Case "TPC":"TPC"
    Case "TPC Bldg A":"TPC"
    Case "VDO":"VDO"
    Case "Visalia WID":"VDO"
    Case "South Mooney":"VDO"
    Default:"Other"
    Hope this helps.
    Eric

  • Question - Sorting by a specified order that is neither Z to A, or A to Z -- is this possible and how?

    I need records sorted in a specified order using a text field where A to Z or Z to A won't work.  An example would be Orange, Banana, Cherry.  How do I make it happen?

    Hi OceanDr,
    Based on your description, you want to Sorting by a specified order, neither A to Z nor Z to A. If in this scenario, we can try to add a calculated field to convert the values of the field to a, b, c, d… depend on the specified order. Then Sorting the field
    by A to Z to achieve your requirement. For more details, please refer to the following steps:
    Right-click the dataset to add a calculated field named Order with the expression like below:
    =switch(Fields!LineCode.Value="Orange","A",Fields!LineCode.Value="Banana","B",Fields!LineCode.Value="Cherry","C")
    Right-click the report item to open the properties dialog box.
    Click Sorting in the left pane, then add a sorting as below:
    Sort by: [Order]                                                                  
    Order: A to Z
    If you have any other questions, please feel free to let me know.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Can I next two specified order groups in a Cross Tab report?

    Hi. I've created sets of specified order account number for a financial statement report, Income and Admn Expenses, Contract Expenses, etc. But I'd like to create other subsets of accounts, say for all the payroll taxes expeneses, and under the original specified order for Salaries & Benefits Expense, add various account numbers and the subset Payroll Ttaxes.
    Is this possible?
    Thanks!
    Robin

    Hi Robin,
    I think you could achieve that using subreports; in each subreport, you would work on a specific set of data.
    In the main report, you would just display the required data from each subrport.
    I hope this helps,
    Selenia

  • Is there a way to "mix" the nodes and leaves of the tree so if they are at the same level, they will display in a specified order.

    Is there a way to "mix" the nodes and leaves of the tree so that even if they are at the same level (1,2,3...), they will display in a specified order (via sort sequence, alphabetical, etc.).
    History:
    We are using the Tree UI element to display/manage a material bom interface. We seem to be running into an issue with displaying the nodes/leaves of the tree.. regardless of the order that the context is built (which is currently the order of the exploded BOM from from CS_BOM_EXPL_MAT_V2), the bom is displayed with the nested boms at the top of each level and the single materials below them. For example. If  TK1 contains Material1, Material2, Material3, Kit1(containing component1, comp2, comp3), Material4, Kit2(containing comp4, comp5, comp6), and Material5 (in this order), the tree will display with the A level node as TK1, the next node as Kit1 (with its subleaves of comp1,comp2,comp3), Kit2(with subleaves of comp4,comp5,comp6), THEN Material1, material2, material3, material4, material5.  Our users are adamant about the items displaying in the correct order (which should be alphabetical based on the description for one report and by location for purposes of inventory for another). I've searched but not been able to locate a similar question. If I've missed it, please point me in the right direction. The users want the tree,  not a "tree" table.  This is our first attempt at the tree, so maybe we're missing something basic?
    TK1
    -Mat1
    -Mat2
    -Mat3
    -Kit1
    --Comp1
    --Comp2
    --Comp3
    -Mat4
    -Kit2
    --Comp4
    --comp5
    --comp6
    -Material5
    displays as
    TK1
    -Kit1
    --Comp1
    --Comp2
    --Comp3
    -Kit2
    --Comp4
    --Comp5
    --Comp6
    -Mat1
    -Mat2
    -Mat3
    -Mat4
    -Mat5

    co-workers said example picture is misleading.. we can make the order work if everything is a "folder" but not a mix of "folders" and "files" (if making a visual reference to the windows browser). i.e - a file is represented as an empty folder.
    TK1    
    . Mat1
    . Mat2
    . mat3
    > kit1   
    .. comp1
    .. comp2
    .. comp3
    . mat4
    > kit2
    .. comp4
    .. comp5
    .. comp6
    . mat5
    displays at
    TK1
    > kit1
    .. comp1
    .. comp2
    .. comp3
    > kit2
    .. comp4
    .. comp5
    .. comp6
    . mat1
    . mat2
    . mat3
    . mat4
    . mat5
    we can make it work if everything is a folder. This is our current workaround.
    TK1
    > mat1
    > mat2
    > mat3
    v kit1 (when expanded)
    .. comp1
    .. comp2
    .. comp3
    > mat4
    > kit2 (when not expanded)
    > mat5

  • Extremely slow when clicking the Specified Order - New button.

    Post Author: cavenger
    CA Forum: Charts and Graphs
    I often use the specified order option on charts to group pieces of information together. When I click the New button for a new specitied order or if I try to edit an existing specified order, it takes forever for the dialog to come up. I have experienced this problem in both Crystal 9 and 10 installed on different machines. Is there some sort of option I am missing? Maybe something that tells it to query the database. I have no idea why it would do a query at that point, it is not like I am using a select list of options from a drop down where it would need to retrieve the values. The reason this is a problem is that it takes me forever to run reports when I am asked to an add hoc report that requires this sort of customization. VERY frustrating....TIA for all help.

    Post Author: RichardN
    CA Forum: Charts and Graphs
    I'm having the exact same problem.  I think what's most infuriating about this is after waiting several minutes for the "Specified Order" Tab to display, I have to wait several more minutes after I click on the New button.  This happens everytime I click the New button, and I have eight groups to create. 
    I'm using Crystal Report XI Release 2 on Vista with 2 GB of RAM trying to access a Progress database using an ODBC connection. 
    Is there ANYTHING I can do to speed this up?  Is it possible to use the "Formula Editor" to essentially write out the information the Group Options window is creating?
    Thank you,
    R

  • How do I access specified order options programmatically?

    Using the RAS SDK (or any other .NET API), is it possible to access the specified order options of a group? I am talking about the named groups with specified conditions.
    I have found nothing when searching through the documentation, but maybe I am overlooking something. I know this used to be possible with the crpe32.dll - is it no longer possible?
    Thanks in advance!

    Hello, John;
    You can access the GroupOptions throught .NET RAS. Here is a link to the Developer Library section on groups:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/rassdk_net_doc/doc/rassdk_net_doc/html/raslrfCrystalDecisionsReportAppServerDataDefModelGroupClass_MembersTopic.htm
    There is a sample of Group and Group sort code in the "VB .NET How To Samples" at:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/sampleList.htm
    Elaine

  • 3 Table Join with group by and order by clauses

    I am porting from MySQL to Oracle 8i. I have a three Table Join in MySQL as follows:
    select distinct TO_DAYS(l.listend)-TO_DAYS(NOW()) AS daysLeft, i.minbid, l.listend, i.itemid, i.itemtitle, l.listingid, l.lendstart, l.lendend, l.status, MAX(b.amount) AS curBid, COUNT(b.amount) AS numBids from TBL_ITEMS i, TBL_LISTING l LEFT JOIN TBL_BIDS b ON l.listingid=b.listingid where i.itemid = l.itemid AND l.status='1' AND (TO_DAYS(l.listend)-TO_DAYS(NOW()) >= 0) AND i.catcode LIKE'12__' GROUP BY listingid order by curBid DESC, daysLeft;
    It performs an straight join on the first 2 tables (TBL_ITEMS and TBL_LISTING) and a LEFT JOIN between the previous result set and TBL_BIDS. TBL_BIDS uses a group by clause to obtain MAX and COUNT info. This final result set is the sorted (ORDER BY).
    I have tried to reconstruct this type of call in Oracle and have failed. Several problems that I have notices: Oracle does not let me pull in additional columns when doing a GROUP BY clause.
    (see below for my work around)
    I have worked around the problem by creating a TABLE with the group by functionality and doing a straing 3 table join. (NOTE: I cannot create a view because use a LIKE function in the call... view dont have indexes). However, when I try to alias the column that returns DATE subtraction ("l.listend-TRUNC(SYSDATE) daysLeft" OR "l.listend-TRUNC(SYSDATE) dayLeft") I cannot use the LIKE statement.
    Here is my question. How do I port the above 3-table MySQL call to Oracle. Why am I having these problems (is it the Oracle optimizer?) and how do I avaopid them in the future.
    I really appreciate anyone's input. Thanks,
    Inder
    WORK AROUND:
    FIRST STEP:
    "create TABLE BIDSUM as
    select l.listingid, COUNT(b.amount) numBids, MAX(b.amount) curBid from TBL_LISTING l, TBL_BIDS b where l.listingid=b.listingid(+) group by (l.listingid);"
    NEXT STEP:
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE), l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12%';
    THIS ALSO WORKS (no LIKE):
    "select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode='12'";
    BUT THIS DOES NOT (alias the DATE arimetic)
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12__';

    I am porting from MySQL to Oracle 8i. I have a three Table Join in MySQL as follows:
    select distinct TO_DAYS(l.listend)-TO_DAYS(NOW()) AS daysLeft, i.minbid, l.listend, i.itemid, i.itemtitle, l.listingid, l.lendstart, l.lendend, l.status, MAX(b.amount) AS curBid, COUNT(b.amount) AS numBids from TBL_ITEMS i, TBL_LISTING l LEFT JOIN TBL_BIDS b ON l.listingid=b.listingid where i.itemid = l.itemid AND l.status='1' AND (TO_DAYS(l.listend)-TO_DAYS(NOW()) >= 0) AND i.catcode LIKE'12__' GROUP BY listingid order by curBid DESC, daysLeft;
    It performs an straight join on the first 2 tables (TBL_ITEMS and TBL_LISTING) and a LEFT JOIN between the previous result set and TBL_BIDS. TBL_BIDS uses a group by clause to obtain MAX and COUNT info. This final result set is the sorted (ORDER BY).
    I have tried to reconstruct this type of call in Oracle and have failed. Several problems that I have notices: Oracle does not let me pull in additional columns when doing a GROUP BY clause.
    (see below for my work around)
    I have worked around the problem by creating a TABLE with the group by functionality and doing a straing 3 table join. (NOTE: I cannot create a view because use a LIKE function in the call... view dont have indexes). However, when I try to alias the column that returns DATE subtraction ("l.listend-TRUNC(SYSDATE) daysLeft" OR "l.listend-TRUNC(SYSDATE) dayLeft") I cannot use the LIKE statement.
    Here is my question. How do I port the above 3-table MySQL call to Oracle. Why am I having these problems (is it the Oracle optimizer?) and how do I avaopid them in the future.
    I really appreciate anyone's input. Thanks,
    Inder
    WORK AROUND:
    FIRST STEP:
    "create TABLE BIDSUM as
    select l.listingid, COUNT(b.amount) numBids, MAX(b.amount) curBid from TBL_LISTING l, TBL_BIDS b where l.listingid=b.listingid(+) group by (l.listingid);"
    NEXT STEP:
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE), l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12%';
    THIS ALSO WORKS (no LIKE):
    "select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode='12'";
    BUT THIS DOES NOT (alias the DATE arimetic)
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12__';

  • Group by and order by clause

    Hi,
    I have wriiten the below query and i am using group by and order by clause....but i am not getting the required result
    SELECT b.ACCOUNT_REGION,CASE WHEN b.product_reference_status='Reference' THEN 'Recruited' WHEN b.product_reference_status in ('Inactive','Declined') THEN 'Inactive' WHEN b.product_reference_status ='Nominate' THEN 'Inprogress' ELSE 'Other' END product_reference_status, COUNT(decode(b.product_quarter,'Q1FY09',b.REFERENCE_ID)) Q1FY09, COUNT(decode(b.product_quarter,'Q2FY09',b.REFERENCE_ID)) Q2FY09, COUNT(decode(b.product_quarter,'Q3FY09',b.REFERENCE_ID)) Q3FY09, COUNT(decode(b.product_quarter,'Q4FY09',b.REFERENCE_ID)) Q4FY09, COUNT(decode(b.product_quarter,'Q1FY10',b.REFERENCE_ID)) Q1FY10, COUNT(decode(b.product_quarter,'Q2FY10',b.REFERENCE_ID)) Q2FY10, COUNT(decode(b.product_quarter,'Q3FY10',b.REFERENCE_ID)) Q3FY10, COUNT(decode(b.product_quarter,'Q4FY10',b.REFERENCE_ID)) Q4FY10, COUNT(b.product_quarter) Total
    FROM refdump a, ref_dh_pr b
    WHERE A.REFERENCE_ID=b.REFERENCE_ID AND (b.CREATED_ON - NVL(a.REFERENCE_DATE,a.CREATED))>15 group by b.account_region,product_reference_status order by 2
    output is as given below
    Region Status Count
    LAD     Inactive     0
    EMEA     Inactive     21
    *APAC     Inactive     2
    *APAC     Inactive     1
    EMEA     Inactive     2
    EMEA     Inprogress     220
    LAD     Inprogress     19
    LAD     Other     2
    LAD     Other     0
    LAD     Other     5
    LAD     Recruited     182
    APAC     Recruited     191
    My question is
    1) Why i am geeting two APAC regions and 3 LAD (marked *) regions when i have grouped by region and status
    2) How can i make the status in the following order
    a) Recruited
    b)Inprogress
    c)Inactive
    d)Other
    Thanks,

    <i>group by b.account_region,product_reference_status</i>
    Just take all the columns in the group by clause in your select segment and run the SQL, you'll come to know abt the different values in columns which group together.
    *009*

  • Delete a number range Group in internal order

    Dear experts!
    Now, I'm getting some issue about maintain number range group in internal order.
    So I defined a number range group, after that I want to delete the number range group. How do I have to do?
    Best regards, Huy

    Done the question!

  • Price group in sales order

    Hi,
    In the 'Sales' tab folder of a sales order document (both at the header and item levels) is where you find the 'Price group' field.  My question is where in IMG do you maintain the values for this field?  
    Thanks!

    Please disregard this question.... I found the answer!  It's in SD -> Basic functions -> Pricing Control -> Maintain price-relevant master data fields.

  • Changing Availability Checking Group in Sales Order.

    Hello Gurus:
    We changed the checking group in the material master.  The existing sales orders still shows the earlier checking group.  So how to change the checking group in existing sales order also (after it is changed in material master).  Also, once the checking group in sales order is changed, how to de-commit and re-commit material as per the new checking group.  Thanks.
    - Chetan

    Chetan,
    As you have changed Checking Group in MMR later on all ur availability check etc will be calculated as per previous MMR settings..
    Still go to OVZ9...See if your sales order has correct Check rule/Group..
    Then Go to sales order Carry out availability check again...See if Avalability Overview has changes as per your new Check Rule..
    Also Do Some R & D...
    Like test with change in quantity of line items...save and carry out avalability check gain..See if schedule line dates in Sales order Is there any change?
    See if any change is there...
    If not better create new  sales order...it will minimise your efforts and will be quicker way..
    REWARD IF U FINDS THIS AS USEFUL...
    Regds
    MM

  • How to clear the delivery group in sales order?

    Dear All: 
          My sales order is auto created from CRM by BAPI, but in vbap table, the GRKOR field is 001, only one order ,  how to clear the delivery group in the sales order ?
    Regards
    Peter.

    Thread Locked - Reason Duplicate Post
    How to clear the delivery group in sales order?
    Please dont post the same query twice.  Continue all your queries in one thread
    G. Lakshmipathi

Maybe you are looking for

  • Can not view downloaded jpg photos after ios 7 install

    I installed ios 7 on my ipad 3. Now I can not view my jpg picture. They show blank.

  • OIM DB Row LOCK Exception on Quartz tables

    I am facing db row lock error in Prod OIM due to which the Scheduler fails to kick off and an OIM Restart is required to release the lock and start the Scheduler again. This Error is occuring at any time when none of the scheduler( Custom as well as

  • Error message when submitting PDF form

    I am very new at using Adobe Acrobat so I don't really know what I am doing. I created a PDF form for my site. I set it up to submit to an email. When I tested the form and hit the submit button I got this error "An error occurred while creating the

  • Pass parameter to pl/sql block

    Hi, I am getting following error when trying to create staging table from shell script by passing parameter. SQL*Loader-941: Error during describe of table T1_1DAY_STG ORA-04043: object T1_1DAY_STG does not existThis is PL/SQL block being called insi

  • [SOLVED] Paste whole folder permission

    Hi all I have shared a many folders using samba. It works fine. I have one folder named "backup" so I can paste files on it from a windows computer. From windows I can browse and paste empty folders and files on that shared folder (backup), but if I