Problem using my Group level function in a chart

Post Author: LcdCyn
CA Forum: Charts and Graphs
I have created a function (StatePerRecord) that is displayed under the Details section to evaluate each records' state:
Here is my code:
If Not IsNull () Then    (    select         case "fail":            if (Not (IsNull ())) Then               "Passed"           else               "Failed"        case "pass":              "Passed"        default:             "Passed"     )
else      "NA"
I also have group section based on Record ID that groups the state record. In the header of the group footer I need to define summary function (StateSummary) such that
highest state from the state records should be the output here (excluding "NA" state). Here are the priorities:
  Highest - Failed
  Lowest - Passed
I want to use the StateSummary in a graph to show the Summarized State per Record ID.
I used Running Totals in my StateSummary function but I cannot see the field in the Chart expert.
P.S. I use Crystal Reports 10 Professional

Object (when acting as a map) uses toString() as a poor man's hashcode implementation, so you can get more-or-less the behavior you want by implementing the toString() method in your CIDate class and then storing the instances in an Object (rather than a Dictionary).
E.g., say your CIDate looks like this:
          public class CIDate {
            public var num:Number
            public function CIDate(num:Number) { this.num = num }
            public function toString():String { return num.toString(); }
You can use toString() as a comparison operator by keeping things in an Object instead of a Dictionary:
            var testDic:Object = {};
            var key1:ClDate = new ClDate(10000);
            var key2:ClDate = new ClDate(20000);
            var key3:ClDate = new ClDate(30000);
            var key4:ClDate = new ClDate(40000);
            testDic[key1] = 1;
            testDic[key2] = 2;
            testDic[key3] = 3;
            testDic[key4] = 4;
            var key:ClDate = new ClDate(20000);
            var retNum:Number = testDic[key];
Then retNum should be '2', as expected. This is sort of a hack, but it might work for what you're doing.

Similar Messages

  • How to Use a Group by Function

    Hi Gurus,
    I have Requirment where i need to use the group by function to one column
    below is my query , can anyone help how to use the group by for the column OCCASIONALS_QT_STATUS.
    below is giving me the error not a group by expression
    select distinct source_id,OCCASIONALS_QT_STATUS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where OCCASIONALS_QT_STATUS = 'QTS'
    and source_id = gdoc.source_id
    ) OccasionalsQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NOTQTS'
    and source_id = gdoc.source_id
    ) OccasionalsNOTQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NTKNWN'
    and source_id = gdoc.source_id
    ) OccasionalsNOTKNWN
    from gen_dcsf_occasionals_count gdoc group by OCCASIONALS_QT_STATUS;
    any inputs on this is highly appreciable
    Thanks in advance

    909577 wrote:
    Hi Gurus,
    I have Requirment where i need to use the group by function to one column
    below is my query , can anyone help how to use the group by for the column OCCASIONALS_QT_STATUS.
    below is giving me the error not a group by expression
    select distinct source_id,OCCASIONALS_QT_STATUS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where OCCASIONALS_QT_STATUS = 'QTS'
    and source_id = gdoc.source_id
    ) OccasionalsQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NOTQTS'
    and source_id = gdoc.source_id
    ) OccasionalsNOTQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NTKNWN'
    and source_id = gdoc.source_id
    ) OccasionalsNOTKNWN
    from gen_dcsf_occasionals_count gdoc group by OCCASIONALS_QT_STATUS;
    any inputs on this is highly appreciable
    Thanks in advanceFor your own sanity, you should format your code to make it more readable
    For the sanity of those from whom you seek help, you should preserve that formatting with the code tags:
    select
         distinct source_id,
         OCCASIONALS_QT_STATUS,
         (SELECT
               sum(head_count)
          FROM
               gen_dcsf_occasionals_count
          where
               OCCASIONALS_QT_STATUS = 'QTS'   and
               source_id = gdoc.source_id
         ) OccasionalsQTS,
         (SELECT
              sum(head_count)
         FROM
              gen_dcsf_occasionals_count
         where
              OCCASIONALS_QT_STATUS = 'NOTQTS' and
              source_id = gdoc.source_id
         ) OccasionalsNOTQTS,
         (SELECT
              sum(head_count)
         FROM
              gen_dcsf_occasionals_count
         where
              OCCASIONALS_QT_STATUS = 'NTKNWN' and
              source_id = gdoc.source_id
         ) OccasionalsNOTKNWN
    from
         gen_dcsf_occasionals_count gdoc
    group by
         OCCASIONALS_QT_STATUS;

  • Problem using Detail group region

    Hi Guys,
    I'm having problems using a detail group container. The problem is that when the detail group is placed in the detail region group, there is no button under that group to add a new row to the group. Is this a bug in JHS or have I done something wrong?
    The reason I'm using the container is that I want selective rendering of detail groups depending on the state of an item in the parent group.
    Regards
    Bar
    JDev: 10.1.3.2.0
    JHS: 10.1.3.1.26

    Bar,
    I could reproduce both problems. To fix the problem with the New button, you can change the content of the tableGroupButtons.vm template:
    #if ($JHS.page.hasDetailPageComponents || $JHS.page.hasGroupRegionPageComponents)
    <af:panelButtonBar id="${group.shortName}TableGroupButtons">
    #JHS_PARSE("NEW_BUTTON_NOT_IN_FORM_LAYOUT" ${JHS.current.model})
    </af:panelButtonBar>
    #end
    To fix the issue with the roles check, you can enter the rendered expression that is missing in the rendered property of the group region.
    Steven Davelaar,
    JHeadstart Team.

  • Problem using the IMAQ Extract function.Not getting two different image out

    Hi, I am trying to use the multiple IMAQ extract functions to get certain parts of the webcam image and then using the color extract function to get the average RGB values. The problem is that both the IMAQ extract functions give the same image on its output port. The block diagram snippet and VI are attached below. Also, please let me know if there is a better way of doing this. I need to expand this later to extract rgb values of about 40-50 different parts of the image instead of just two shown below.
    Solved!
    Go to Solution.
    Attachments:
    Extract RGB Data.vi ‏104 KB

    You did not create another image that you should wire to the input "Image Dst" of "IMAQ Extract".  That's why you always operate on the original image (which you should not do if you intend to operate on several regions of the image).
    Solution: 
    (1) Create a new image and wire this to "Image Dst".
    (2) Apply the histogram operation sequentially (e.g. in a loop).
    That way you will notice, that Image Dst contains actually(!) the region you have specified.  (Put a probe on the image wire that goes from the Extract VI to the Histogram VI).

  • Problems using right-mouse click functionality in a Captivate added to Articulate?

    Has anyone experienced any problems using the right-mouse click functionality? It's working fine when I preview the project, or view the published Captivate SWF or HTML file, but it's not working when I insert the published Flash file into Articulate and then try it in the published Articulate. I'm using AS2 and Flash Player v10. When I try to right-click it's bringing up the Flash Settings menu you can click on. I've been into my Flash Manager and told it to always allow content from the folder my Articulate is in but that hasn't made any difference. I'm viewing the Articulate on my C drive and I have read that that can cause problems - does anyone have any ideas? If I left-click it recognises it as a click but doesn't recognise it as the correct click action, so just keeps on bringing up my failure caption and won't allow me to progress.
    Thank you!

    Hello,
    The right-click functionality in Captivate is 'in' the JS-file, that is called by the HTML-file that will open the SWF. But if you insert the SWF-file in Presenter (Articulate or Adobe) the right-click functionality will not be there, because you are not using the JS-file. BTW: this was also explained in the thread where you posted this same question before. Please, do not post the same question in 2 different threads
    Lilybiri

  • Problem Using Inner Group Name

    Hi
    In my report design, I have 4 groups level created and all of them are based on Account number. Its like group and subgroup structure.
    All I wanted to do is , I want to supress the Footer of Inner most group(group 4) based on the group name.
    for example if the group4 name ="something" I need to supress group 4 footer section.
    I tried to put the above condition in Supress formula of group4 footer section. its not working.
    On the formula editor I choose the group4 name field avaiable under Report fields. Its comes as
    GroupName ({@Account Number})  in to the formula ( There is not mention of which group name its refers to).
    So by default its  apply the formula on the outter most group name(group 1). So my condition fails.
    Please help me.

    This my structure
    Group Header1                                                           Group 1 Name
        Group Header2                                                        Group 2 Name
           Group Header3                                                     Group 3 Name 
               Group Header4
                             Details                  AccoutNumber    Account Description       Amount
                Group Footer4                  textbox            Group4 name                      sum of Amount          
           Group Footer3
        Group Footer2
    Group Footer1
    I want to supress the Group Footer4 based on Group4 name.
         ASSETS
         CURRENT ASSETS
         1XXX   0092     CASH SAVINGS DBTCA     $172,868,975.44
                                                                          $172,868,975.44
         TOTAL     CASH & CASH EQUIVALENTS
         13XX   5555     A/R OTHER                           $5,423,705.50
                                                                          $5,423,705.50
         TOTAL     ACCOUNTS RECEIVABLE
         1XXX   0001     I/C REC MGMT LLC SAN FRAN     $8,878,791.16
         1XXX  0001     I/C REC MGMT CO SAN FRAN     $45,046,263.00
           TOTAL     INTER   COMPANY RECEIVABLE           $53,925,054.16
         1XXX  0000     DEFERRED TAX ASSET     $70,548,040.00
         $70,548,040.00
         TOTAL     NOTGROUPED
          302,765,775.10
    The bold lettered text are belongs to Group4 footer . I want to suppress it if the group 4 name is " NOTGROUPED"
    Edited by: Nivazz on Sep 9, 2009 5:16 PM
    Edited by: Nivazz on Sep 9, 2009 5:17 PM

  • Problem using a group which has a space in it's DN when using LDAP Group mappings in UCS 1.4

    Hey,
    We've been implementing LDAP authentication (Active Directory) using LDAP group mapping in UCS 1.4, and we've noticed that when using a group which has a DN with a space in it (such as "UCS Admins") it wouldn't authenticate the user with the appropriate role.
    Using a DN without spaces (such as "UCSAdmins"), works just fine.
    I should mention that having a base DN with spaces works just fine as well, it's just the group mappings that doesn't work.
    I should also mention that Cisco's "Quick guide to configuring ldap for ucs 1.4" shows an example in which the group's DN doesn't include a space.
    Is there a workaround available which can make it possible using a group which has a space in it's name?
    Thanks,
    Dor

    Hey Roman,
    Thanks for your prompt reply.
    We've tried putting quotes using UCSM which is not possible at all - not for the entire entry nor for the part with spaces.
    We've also tried using CLI ("scope security/ldap/ldap-group") where you have to put quotes if you use a DN with spaces, and it still doesn't work. Furthermore, we tried adding quotes only to the part with the spaces, i.e. - CN="UCS Admins",OU=TEST,DC=TEST. It adds the entry without an error, but shows like we would use "CN=UCS Admins,OU=TEST,DC=TEST". Anyway, it doesn't work either.
    Thanks again,
    Dor

  • Problems using the reset password function on mac osx server.

    Hey ,
    Having problems with the reset password functions on the OSX server. When I try to do through the command line it asks for the old password of the user. So how do I fix the problem? Do I have to log in onto the ldap server as the admin and reset from there or is there an easy fix to make the reset password function work. When I try the reset password function the server is not taking the input when I click on change password. So any helpful suggestions are welcome. Verson OSX lion 10.7.5
    Thanks in Advance,

    Excuse me for misunderstanding your post.  You explicitly stated in your post
    ashdatla wrote:
    through the command line
    and wrote that it asks for the old password.  Server.app is not accessed through the command line, and it does not ask for the old password of the user.
    You might like to try Workgroup Manager instead.

  • Problem using choice group

    I am developing a project on quiz.
    I have to show question and 4 options in one screen.also I want that the radio buttons(choice group)for the options should be selected by up down keys only.For using up down keys I have to extend canvas.if I extend canvas then how can I place my question and radio buttons?

    You can't use the ChoiceGroup on a Canvas. You'll have to make your own menu widget.
    Another option would be to display first the question on a form with a Command "Answers" and then when the Command is pressed you switch to a List (with List.IMPLICIT set as the type).
    shmoove

  • Problem using contact groups in email

    I have created a GROUP of contacts with the Contacts application. There are 21 emails in this group. I am using Postbox as my email client. When I go to create an email and select this group for the TO field, it only puts in 19 of the 21 people in the group ommiting 2 people. Their emails are correct so I am nt sure what the heck is hapening. Any suggestions?
    Many thanks,
    Houston

    Hello Annie,
    Drag it from Address Book to Mail's BCC: field, or just type the name of the Smart Group there.
    PS. It's usually considered very bad form to use the To: or CC: fields for multiple addies.

  • Problem using E61 Remote Lock Function

    Hi All,
    When I try to set the Remote lock passphrase, e61 asks for lockcode (12345 by default), once I entered an error message pops up... Unfortunately the pop-up message got covered up by another one but in the split second I think it says "...wrong...5 times..." So I try to reset the default 12345 lockcode but receive "General: system error"
    Is there a backdoor to reset the 12345 lockcode?
    I've also set a password for Mem card but makes no difference.. (According to Forum at My-Symbian you need to set a password or lockcode on both mem card and phone to enable this remote lock function.)
    Any suggestions?
    Thx

    my 6280 it need registration code or online unlocking

  • I just tried the 'group tabs' function but when I close a window and open a new one, the last page I viewed opens every single time. I can't remove or ignore the group tabs function and it automatically opens with it. How can I stop this?

    Before I attempted using the 'groups tab' function for the first time, there was no icon (unlike currently). There is now the icon with for the function yet I am unable to remove it or its function.

    Try a clean reinstall and delete the Firefox program folder and desktop shortcut before (re)installing a fresh copy of the current Firefox release.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 23.0: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you lose personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • Prob with group by function

    Hi frds
    I wrote a code where there is a subquery in my select statement, when i use a group by function with my query it comes with an error
    Example
    This is how my select statement looks
    SELECT
    mt.subinventory_code,
    item.description,
    we.wip_entity_name,
    SUM((mt.transaction_quantity)*-1),
    sum(wro.required_quantity),
    sum(wdj.start_quantity),
    (SELECT SUM (transaction_quantity) FROM mtl_onhand_quantities
    WHERE inventory_item_id = wro.inventory_item_id
    AND organization_id = wro.organization_id) rm_stock
    And my group by statement is of this way
    group by
    mt.subinventory_code,
    item.description,
    we.wip_entity_name
    When i excute the query
    It results in an error like this
    ORA-00979: not a GROUP BY expression
    When i remove the subquery from my select statement it works fine,but i want the result including the subquery plz help me

    I don't know the implications, but give this a try.
    SELECT we.wip_entity_name JOB_NO,
           mt.subinventory_code DEPARTMENT,
           msi1.segment1 assembly_item,
           msi1.description assm_desc,
           sum(wdj.start_quantity) ASSL_QTY,
           item.segment1 PART_CODE,
           item.description PART_DESCRIPTION,
           item.primary_uom_code UOM,
           sum(wro.required_quantity) REQUIRED_QTY,
           SUM((mt.transaction_quantity)*-1) ISSUED_QTY,
           mfg.meaning JOB_STATUS,
           SUM (mol.transaction_quantity) rm_stock
    FROM mtl_material_transactions mt,
         mtl_system_items item,
         mtl_system_items msi1,
         wip_e0ntities we,
         wip_requirement_operations wro,
         mfg_lookups mfg,
         wip_discrete_jobs wdj
         mtl_onhand_quantities mol
    WHERE mt.inventory_item_id = wro.inventory_item_id
    and mt.inventory_item_id=item.inventory_item_id
    AND item.inventory_item_id = wro.inventory_item_id
    AND we.wip_entity_id = wro.wip_entity_id
    AND wdj.wip_entity_id = we.wip_entity_id
    AND mfg.lookup_code = wdj.status_type
    AND mt.organization_id = :org_id
    AND mt.inventory_item_id = wro.inventory_item_id
    AND item.organization_id = wro.organization_id
    AND mt.transaction_source_id = we.wip_entity_id
    AND msi1.inventory_item_id = wdj.primary_item_id
    AND msi1.organization_id = wro.organization_id
    AND we.wip_entity_id = wro.wip_entity_id
    AND we.organization_id = wro.organization_id
    AND mfg.lookup_code = wdj.status_type
    AND mfg.lookup_type = 'WIP_JOB_STATUS'
    AND mt.transaction_type_id = 35
    AND wro.department_id <> 1001
    AND wro.required_quantity > transaction_quantity*-1
    AND mol.inventory_item_id = wro.inventory_item_id
    AND mol.organization_id = wro.organization_id
    group by mt.subinventory_code,
             item.description,
             item.segment1,
             we.wip_entity_name,
             mfg.meaning,
             item.primary_uom_code,
             msi1.segment1 ,
             msi1.description;Cheers
    Sarma.

  • Usage of group by function on oracle 8i

    Is it possible to use a group by function in a query involving two tables
    say for example the emp table and the dept table .i tried the following query
    but it never worked.could some one clarify this.iam aware of CUBE and ROLLUP in 8i but i still want to try with group by for the sake of interoperability with 7.3/8.0 .Thanking you
    SELECT E.DEPTNO,AVG(SAL),D.DNAME,
    FROM EMP E,DEPT D
    WHERE E.DEPTNO = D.DEPTNO
    GROUP BY E.DEPTNO

    Hi,
    try the following:
    SELECT E.DEPTNO,D.DNAME,AVG(SAL)
    FROM EMP E,DEPT D
    WHERE E.DEPTNO = D.DEPTNO
    GROUP BY E.DEPTNO, D.DNAME
    Regards
    -Sree Ram

  • Confusion in group by function

    Hi,
    I always have a doubt regarding the group by function i.e. if we are using a group by function and we want to display some columns which are not to be grouped by then how do we display those.
    Like for eg.
    to display last name, department no and average of salary for each department how should we proceed.
    I know we can display the department no, and avg(sal) but how abt the last name.
    Do we use a subquery?
    Any thoughts or explanaitions with example?
    Thanks

    hi, People often get confused with group by function.
    You have to be very clear about this that the group by must include all the columns that have been selected. If you want to use another column out of group by list then that column must be driven by the another table join or inline table join.
    bye

Maybe you are looking for