Sum of all values in a list

Hi,
I am having a list which has item and corresponding price.I wanted to do sum of all the prices in the list object.how can i do that?
Thanks in advance
rk

I am having a list which has item and corresponding
price.I wanted to do sum of all the prices in the
list object.how can i do that?and what have you tried so far?....
In case you haven't figured out yet, here we try to nudge you to do as much for yourself as possible... even to figure out the solution on your own. To do so will make the solution your own forever.

Similar Messages

  • CR 2008, all values in parameter list not showing up

    The parameter is not optional, the parameter value exists in the view on SQL server, but at report run-time, only get 5 pages of possible values to select from and user needs to go back farther to get the required report.
    I can get the report to run in full CR version by passing the value into the select expert, but users only get prompt window from the runtime version of CR.
    How can I get ALL the values of the field in the view to show up in parameter list?
    Thanks for any pointers.
    Robert

    Not sure if the help you metion is equivalnet to KB [1218588 - How to increase the number of values in a dynamic parameter list?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333533383338%7D.do], but have a look.
    Also, make sure you are on SP3:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • By Default All Value Into Select List,If Select % In select List

    Hi ,
    i have created application process to extract state name in select list based on city name.
    Now i need if i don't have city name and i have select % into City Name select List then All State Name Should Come into Select List.
    Right Now if i select % into select List then It show me Blank In to state Name Select List.
    How can i extract All State Name if i select % Into Select List.
    My Application Process
    BEGIN
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
    htp.prn('<data>');
       HTP.prn ('<select>');
       FOR c IN (select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND C.CODE =:SELECT5)
    LOOP
      HTP.prn ('<option value="' || c.CODE || '">' || c.NAME || '</option>');
       END LOOP;
       HTP.prn ('</select>');
    htp.prn('</data>');
    END;My City Name Table
    CREATE TABLE  "CITY_MAS"
       (     "CODE" VARCHAR2(3) NOT NULL ENABLE,
         "NAME" VARCHAR2(1000) NOT NULL ENABLE,
         "STATE_CODE" VARCHAR2(3) NOT NULL ENABLE
            )My State Name Table
    CREATE TABLE  "STATE_MAS"
       (     "CODE" VARCHAR2(3) NOT NULL ENABLE,
         "NAME" VARCHAR2(50) NOT NULL ENABLE
    /How can i do this.
    Thanks
    Edited by: 805629 on Jan 25, 2011 2:06 AM

    select S.NAME,S.CODE from STATE_MAS S join CITY_MAS C on (C.STATE_CODE=S.CODE)If you join two table you must have some equal data between this tables. and define it on your sql. Else you join will be cartesian join. if you dont want use this sql then create view
    create view TEST1 as (
    select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE
    select * from test1 where  C.CODE =:SELECT5 OR :SELECT5 = '%' Edited by: Adigozalov Gurban on Jan 25, 2011 3:46 PM

  • CR 2008, missing parameter values in parameter list

    somehow this thread got posted in the  .NET SDK section, so re-posting here...
    When my users run the report, the list of values in the paramter list does not include all the possible values that exist in the view on SQL server.
    How can I get ALL the values of the field in the view to show up in parameter list?  What is controlling how many/few values show up?  I have not limited in any way what should be returned from the view (not a cascading set of parameters), and the view is not set up to limit what values are available either.
    Thanks for any pointers.
    Robert

    From a mis-post on the .NET forum, a solution was suggested that works....
    Re: CR 2008, all values in parameter list not showing up

  • SSRS 2012: How to get a "Select All" that returns NULL instead of an actual list of all values from a multi-select parameter?

    I have a multi-select parameter that can have a list of thousands of entries. In general, the user will pick a few entries from the list or "Select All". If they check "Select All", I would much prefer that I get a NULL or an empty string
    instead of a list of all values. Is there any way to do that?
    In experimenting with a work-around, I tried putting an "All" label with a null value in the list, but it is ignored (does not display in the drop-down). If I use an empty string for the value, my "All" entry does get displayed, but so
    does "Select All", which is confusing. Is there a way to suppress "Select All"?
    - Mark

    I adapted the following from a workaround posted by JNeo on 4/16/2010 at 11:14 AM at
    http://connect.microsoft.com/SQLServer/feedback/details/249227/multi-value-select-all-parameter-in-reporting-services
    To get a null value instead of the full list of all values when "Select All" is chosen:
    1) Add a multi-value parameter "MyParam" that lists the values to choose.
    2) Add a DataSet "ParamCount" identical to the one used by "MyParam", except that it returns a single column named [Count] that is a COUNT(*) of the same data
    3) Add a parameter "MyParamCount", set it to hidden and internal, then set the default value to 'Get values from a query', choosing "ParamCount" for the Dataset and the one [Count] column for the Value field.
    4) Change the parameter for the main report DataSet so that instead of using [@MyParam], it uses this expression:
    =IIF(Parameters!MyParam.Count =
    Parameters!ParamCount.Value, Nothing, Join(Parameters!MyParam.Value, ","))

  • Report -- filter with selection list -- show all values after select page

    Hello!
    I have the following problem:
    - I have a report
    - this report can be filtered with a selection-list
    - the selection list is based on dynamic LOV and has a null-value
    - I added the code of the report the following, to filter the report after choosing a value of the selection list:
    ... and (instr(type, decode(:P8_FILTER_type, '%null%',type,:P8_FILTER_type)) > 0)
    This works very well.
    But my problem is: When the user logs out and the next time, he logs in, the selection list shows " --- show all values --- " (my null-display-value) and the report is empty "no values found".
    ---> I want to show the first time, the page is selected ALL the values of the report. (this is now only possile if I press the button which belongs to the selection list)
    I hope, somebody understands my problem.
    Thank you so much,
    LISA

    Hello Lisa,
    The first time it's probably NULL.
    So what you can do in your where: (instr(type, decode(NVL(:P8_FILTER_type,'%null%'), '%null%',type,:P8_FILTER_type)) > 0)
    Off topic: I also wonder if that where clause can't be simpler? Do you rely need the instr?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How to create a search all value on list

    I am trying to create a form which will enable user to select
    an item on a list to filter records, or allow him to not select
    anything and see all records.
    I created a generic form with one list on it and a submit
    button. Values are:
    Item Label Value
    Select All-- (I left this blank)
    Bicycles--Bicycles
    Motorcycles--Motorcycles
    Skateboards--Skateboards
    My results page seems to be okay. I created a recordset and a
    dynamic table. In recordset, the default varable that was created
    shows Name: colname
    Type: Text
    Default value: -1
    Runtime Value: $_POST['2']
    Problem is that when I select one of the items from the list
    on the form (ex. skateboards), my results page shows all records
    for skateboards. When I select "Select All" from the list, I don't
    receive any records. What can I do to allow user not to enter any
    value and have him receive all records?
    Thanks in advance....

    I found the answer for all of you trying to do the same
    thing:
    In your "Select All" value, put %
    then, select 'contains' instead of = in your filter. That
    should do it! Hopefully this helps someone!

  • This column cannot enforce unique values because this list or document library may contain items that are not viewable by all users.

    The above error occurs when I place unique constraint on a column in a custom list. This error only occurs because the custom list has been configured to only allow creaters to view and edit their own list items.
    I just can't see why that should prevent SP from placing a unique value constraint though.
    One easy workaround would be to place the unique constraint on the SQL Server table that represents this list. However, in a hosted environment, it is not always possible to gain access to the backend server. What is more, I am uncomfortable with this
    approach as it may break other parts of SP 2010.
    Is there any other approach?

    Hi,
    If SharePoint were to enforce uniqueness on a column in a list where users are only allowed to see and edit list items that have created, then you could have a scenario where -
    a. user1 tries to add a new item to the list which violates the uniqueness constraint
    b. SharePoint reports an error
    c. user1 gets to know that there is another item containing the same value in this list
    d. this violates the security settings that you configured (each user should be allowed to only see the items that they have created). Now if you change the permissions settings to allow users to SEE all items, but only
    edit items that they have created, this error disappears (obviously).
    Now getting to the workaround you mentioned (creating a unique constraint on the SQL Server table). This is not going to be possible for numerous reasons -
    a. Modifying (or for that matter, even performing SELECT operations on) the SQL Server tables is an unsupported operation and it will definetely break other things in SharePoint, not
    to mention that you will lose all support options from Microsoft. However if you don't care about this, then it will still not be technically possible because...
    1. SharePoint does not create a new SQL Server table for every list/library. 
    2. If you did get around to enforcing a unique constraint in the one single table that SharePoint uses for all lists, then you will be enforcing this constraint on each and every list in all the sites and in all the site
    collections that are assigned to that content database.
    Please "Mark as Answer" if a post has answered your question or "Vote as Helpful" if it was helpful in some way. Here's
    why

  • Need sum on all coulumns except for one coulumn needs max value

    Hi Gurus,
    I have a requirement like:
    Say I have 3 columns like C1,c2,c3.
    On day1 the record values are 100,150,200
    On day2 the record values are 100,150,300
    End result ..for column C1 and C 2 I should get sum of them
    so the result for C1 as per the above values: 200
    c2=300
    But for C3 column, I should get only maximum value..like 300 (not sum)...
    Using case statement by setting a flag on max report date.. we can do this ..Is there any other that this can be achieved. (In ETL or RPD or Front end)
    Thanks.

    For C3 column instead of showing all values like 200, 300 just show max value only so that you can get output as below and when you sum the value remain 300. Try it out. It can be in rpd or in the report.
    On day1 the record values are 100,150,300
    On day2 the record values are 100,150,300
    mark if make sense
    Thanks

  • "All choices" lists not all values of a field

    I've encoutered a problem.
    "All Choices" in Answers filters doesn't list all values of a field (I have 290 distinct values, but there are only 14 pages in "All Choices" - that is, only 140 values out of 290)
    Some often values don't present in the list.
    This situation is true only for some fields (for other there are really all choices even if there are thousands of distinct values, either text or numeric)
    Has anyone encountered this?

    try setting your prompt to "SQL Results" and prefixing the sql with "SET VARIABLE DISABLE_CACHE_HIT=1; "
    this should help avoid the caching issue in the future on your prompts. also - do you have any other prompts? any set to "constrain"?

  • How to sum all items in a list in applescript?

    Hey guys,
    I wanted to sum all items of a list full of numbers and divide the number by the count all items of a list, is there a easy way to do this?
    Thank you so much in advance

    You didn't say which is the source of the list.
    Assuming that the list isn't extractyed from a Numbers table Niel's answer is OK.
    If you installed the free OSAX Satimage
    http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html
    you may study its arrays functions.
    For this tool, a list is a simple array so you may apply the function statsrecord
    Yvan KOENIG (VALLAURIS, France) samedi 4 février 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • LiveCycle 8.1 on Vista: dropdown list box doesn't show all values

    On Vista Business O/S, in LiveCycle 8.1, I am using a dropdown list for 254 items, not dynamically loaded (all values are declared in the definition of the object). When the form runs, the dropdown list appears. I can scroll through the list. However, the scroll stops short, never showing the last few items on the list.<br /><br />   Is there some limit I have exceeded or is there some know bug I have encountered or is there some other action I need to take so I can choose any item from the dropdown list?<br /><br />   Dropdown list box is defined as user-entered - optional, default <none>.<br />254 text items, longest item is 19 characters, average item is 10 characters long. <br /><br />   Thanks in advance for any help, hints, or tips you provide.<br /><br />Dr. Dave Dyer

    Dear Friends....
    it seems to be a bug of the SQL Server Data Tools, (SQL Server 2012 SP2)... I did the deploy of my Dashboard, (and details Reports), to my Test Reporting Services Server.. and everything works as expected....
    Cheers, Luis

  • Dropdown list with custom All Values option

    Hi,
    We are running VC on 7.4 SP2. I have a dropdown list which gets its' values from a BW query. This works great except that I want to add a custom entry which selects all values.
    In BW you would do this by setting the selection variable to "" as in nothing specified/empty. This is also the default setting in VC (you made no selection so you will get all results) but once you select something this can not be deselected.
    So the idea is to add a custom entry All with value "" but apparently this gets send to BW as """" which is not a valid value. VC does not allow to use an empty value field.
    So basically I am stuck here. Any of you found a solution to this problem?
    regards,
    Matthias

    Hi Matthias,
    I see your point. I could suggest two options:
    1. In the dropdown input control, delete the value. Then press submit.
    This works fine, only we don't get the empty value in the list.
    2. To have the empty value in the list, like this:
    Add to the entries of the list:
    Then edit the mapping to the service to convert * into an empty string:
    Thanks,
    Udi

  • Calculate % of answers across all records in a list

    I have a list that gathers information from users. I want to calculate the percentage of a given answer across all records. To keep things simple, consider the following example.
    A list called "Shirts" contains 3 choice fields:
    1) Color: with choice options of Red, Blue or Green
    2) Size: with choice options of Small, Medium or Large
    3) Style: with choice options of T-Shirt, Button-up or Long-Sleeve
    At the bottom of the page I want to display what percentage (across all records) that the shirt color chosen was Blue.
    So if I had 10 records in the list and 4 of those listed color as Blue, the bottom of the main view page would show: Blue = 40%. This percentage would then update as more records are added. ie - an 11th record is added that does not choose Blue so the percentage
    would then display as 36%.
    I know how to do calculations like this within a given list record but I need a way to keep a running calculation across all records that updates as new records are added.

    Hi Mike,
    As a workaround, you can use JavaScript to retrieve items value from a List and calculate the value according to your requirement, then display the result in the list
    view page.
    Here is a link about how to retrieve items from a List using JavaScript:
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    I modify the script a bit in the link above, you can apply the script below to your list view page, it will display the percentages of each value as you need:
    <script type= text/javascript>
    _spBodyOnLoadFunctionNames.push("ready");
    function ready()
    ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "sp.js");
    function retrieveListItems()
    var clientContext = new SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('List1');
    var camlQuery = new SP.CamlQuery();
    this.collListItem = oList.getItems(camlQuery);
    clientContext.load(collListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded(sender, args)
    var blueCount = 0, redCount = 0, yellowCount = 0;
    var listItemEnumerator = collListItem.getEnumerator();
    var sum = collListItem.get_count();
    while (listItemEnumerator.moveNext())
    var oListItem = listItemEnumerator.get_current();
    if(oListItem.get_item('Color') === 'Blue')
    blueCount += 1;
    if(oListItem.get_item('Color') === 'Red')
    redCount += 1;
    if(oListItem.get_item('Color') === 'Yellow')
    yellowCount += 1;
    document.getElementById('blueSpan').innerHTML = "Blue: " + blueCount/sum*100 + "%";
    document.getElementById('redSpan').innerHTML = "Red: " + redCount/sum*100 + "%";
    document.getElementById('yellowSpan').innerHTML = "Yellow: " + yellowCount/sum*100 + "%";
    function onQueryFailed(sender, args)
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    <p id="blueSpan">Blue:</p>
    <p id="redSpan">Red:</p>
    <p id="yellowSpan">Yellow:</p>
    About how to add JavaScript into SharePoint page:
    http://blog.cloudshare.com/2012/10/29/how-to-insert-custom-javascript-code-in-sharepoint-2013-pages-part-i/
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for