Display a sum of a column(field) in the view

Hi
I would like to show the sum of a revenue field(currency) in any view of the opportunity entity(only when revenue field exist in the view) , may be at the end of the view or as a alert message on button click., but sum should change dynamically based on
the filters applied or selected records.
E.g. Here Est. Revenue to be summed and displayed.
Kindly help me... Thanks in advance.
Rekha.J

This is the Solution
Add This Code to Desing Page:-
<GridView id="GrdView1" Runat Server/>
<asp:TemplateField HeaderText="Date" ItemStyle-Width="100px">
                        <ItemTemplate>
                           <%# Eval("Date","{0:MMM d,yyyy}").ToString()%>
                        </ItemTemplate>
                        <FooterTemplate>
                            Sub-Total:
                        </FooterTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Amount" ItemStyle-Width="118px">
                        <ItemTemplate>
                            <%# GetAmount(decimal.Parse(Eval("Amount").ToString())).ToString()%>
                        </ItemTemplate>
                        <FooterTemplate>
                            <%# GetToalAmount().ToString("")%>
                        </FooterTemplate>
                    </asp:TemplateField>
</GrigView>
In the cs file write the code on pageload as
decimal TotalAmountPaid = 0;
    public decimal GetAmount(decimal Price)
        TotalAmountPaid += Price;
        return Price;
    public decimal GetToalAmount()
        return TotalAmountPaid;
Then Run This..............................

Similar Messages

  • To display Total sum of a column in a table view control ?

    Hi,
      I am unable to display the sum of a column in a table view control ( using HTMLB ). How should one display the sum of a column in a table view control ?
    Thanks in advance.
    Vara.

    Hi there, do a search in this forum for TableView Iterator. Then check out these weblogs:
    /people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators
    /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
    An Iterator is the way to go for you

  • Not able to display the values in the input fields of the view

    Hi All.
    I am facing an unique issue.
    My custom element created in my custom node getting a null value
    from a Get Vendor Details RFC written in RFC.
    The values are getting populated in the custom element but not coming in the
    input field of the corresponding view.
    Then, I wrote this code
    wdContext.nodeCustom.setLeadSelection(1);
    and all the output came in the input field.
    Now, after a build it is not coming in the input fields of the view.
    All my custom nodes are Singleton and values are coming in the custom elements
    as I can print them by wdComponentApi.getMessageManager.reportSuccess(""+customnode.getField());
    All my nodes are Singleton.
    Please give your valuable inputs.
    Regards
    Kaushik Banerjee

    Hi
    Check the node property
    initializeLeadSelection     true
    if not make it true , I would suggest to make a value node of the same structure as in RFC after execuation of the RFC populate the value manually.Dont bind it directly to the UI element.
    BR
    Satish Kumar

  • Displaying Description for SAP Table Field in the View

    Hi
    We are working on a HANA implementation Project Where we have a requirement to build View on HR tables.
    Issue: When i join HR infotypes (tables ) in the view it is getting only Technical names and not descriptions. i have used Semantics option which is available and still it doesn't bring description in to the View.
    Please let me know if any one has solution or work around for this.
    We have more than 100 fields in the View so maintaining Descriptions manully will take lot of time.
    Regards
    Venkat

    Hi Chandra
    Yes, We have Description available in the sourece tables.
    We are connected to HANA Suite and tables in ECC having Descriptions.
    Regards
    Venkat

  • Problem in Adding Field in the View

    Hi Friends,
            I want to add one field in the view of Interaction Center Webclient.
    I copied the view to the Custom BSP and when i try to Add the attribute in context node the Required Attribute is not available in BOL Entity.Please Help me How to Proceed this.
    Thanks & Regards,
    Ashok.

    Hi,
    Create ITAB as follows:
    Fetch all the data from all the columns SME001 to SME016 in the respective columns in internal table itab.
    Make use of field-symbol to add the value of the corresponding columns as follows:-
    <FS1> as line type of ITAB
    <fs2> type any.
    Assume period selected is 007
    LOOP AT ITAB ASSIGNING <FS1>
    DO.
    IF PERIOD = 000.
    exit.
    ENDIF.
    Concatenate 'SME' period into LV_VARIABLE.
    Assign component LV_VARIABLE of structure <FS1>
    to <FS2>.
    if <FS2> is assigned.
    sum = sum + <FS2>
    endif.
    period = period - 1.
    ENDDO.
    ENDLOOP.
    So now sum will contain the sum of the values of SME001 to SME007.
    I hope it is clear.
    Regards,
    Ankur Parab

  • How  to validate the mandatory fields in the view in WDA?

    Dear experts,
                            Iam new to WDA. i just want to know how  to validate the mandatory fields in the view in WDA?please refer any documents for validating the mandatory fields.
    Regards,
    murthy.
    Edited by: Murthy Ganti on Jul 13, 2009 2:31 PM

    Hi,
    Firstly goto view->select the element that you want to make mandatory and set the State property to required.
    Secondly place the below code in the WDDOBEFOREACTION
    DATA: l_view_controller TYPE REF TO if_wd_view_controller.
    * Get view controller
      l_view_controller = wd_this->wd_get_api( ).
    * Check for mandatory attribute
      cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
      EXPORTING view_controller  = l_view_controller
                display_messages = abap_true
    Regards,
    Radhika.

  • Hiding columns/fields in the response portfolio after you distribute your form

    I have a 10 page from that has about 100 radio buttons (yes/no) in it.  After someone submits the form and I open my response portfolio the only columns/fields I want to see is the name, date, age and exclude all the radio buttons. Can you set an option LC ES before you distribute the form?
    I have found I can do this within the portfolio pdf, but only going to modify---view-then unchecking what I do not want to see…………BUT it is ONLY one at a time.  If there is another way of doing it LET ME KNOW!!
    Thanks
    mike

    The response file is a collection. But unfortunately it can't be edited, at least not easily.  You can remove a column with a script run in the console window.
    this.collection.removeField("FieldName");
    The field name is typically the name displayed at the top of the column.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • Hiding columns/fields in the response portfolio in Adobe Pro X

    First WHERE is the modify---view in X
    In LiveCycle Designer, I have a 10 page from that has about 100 radio buttons (yes/no) in it.  After someone submits the form and I open my response portfolio the only columns/fields I want to see is the name, date, age and exclude all the radio buttons.
    In Adobe Standard 9 and while in the response portfolio I can remove the columns/fields, but only going to modify---view-then unchecking what I do not want to see…………BUT it is ONLY one at a time.  If there is another way of doing it LET ME KNOW!!
    Thanks
    mike
    Please send me your email if you do not understand what I am trying to get ask/explain. I can then send screen shots to you to see what i am trying to get across
    mike
    [email protected]

    The response file is a collection. But unfortunately it can't be edited, at least not easily.  You can remove a column with a script run in the console window.
    this.collection.removeField("FieldName");
    The field name is typically the name displayed at the top of the column.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • How to add Column field in the custom Query Link search page as a header

    Hi,
    I have created a Query page link in web layout editor. Now, I want to customise the view of the result. I see an option to change the "Text1" and "text2", but how do I add other fields as a colum in the search result ?
    The only column I see by default Id, Title, release date and author. I want to see some of the custom metadata in the search result. I don't wan't to apply user specific custom search page.
    Overall, I want a common search view across all the user such that each user doesn't have to create a custom search view.
    Please help.
    Thanks

    hi
    By adding context node, you will not be able to fetch value. To fetch value in BTSubject, you need to have following nodes in your context node.
    Node          Relation                  Higher level node
    BTAdminH
    BTBOSSet  BTHeaderBOSSet   BTAdminH
    BTSubjectSet BTSubjectSet_A BTBOSSet
    BTSubject BTSubjectAll  BTSubjectSet_A
    Right now you dont have BTBOSSet and BTSubjectSet in your view. That is why component is unable to pull data in BTSubject.
    My suggestion would be to create cuco with above nodes
    Bind BTAdminH with BTAdminH of Component controller
    and bind BTSubject of details view with BTSubject of your Cuco.
    If you want code code gp catalog as it comes in complaint then there is seperate procedure for that.
    Best regards
    Pankaj Kumar

  • How to calc sum of one column, based on the condition of another column?

    I would like to create a formula that adds up the total cost from column F for each specified service in column D. For example, the result for PM (project management) would be $495. Any ideas?

    I think you could use this formula, using your cell references:
    =SUMIF(D4:D21,"=CM",F4:F21)
    Then, change the "=CM' to "=PM", etc. for each service.
    Like JaxJason, I can't test this in Numbers right now, but it works in Excel, and the functions are identical.
    SUMIF(test-range, "condition", [sum-range]):
    * test-range: A reference to the range of cells containing values to test. Must be the same dimensions as sum-range.
    * "condition": Any comparison statement that results in a logical TRUE or FALSE value.
    * sum-range: Optional; a reference to the range of cells containing the numbers to be added. Must have the same dimensions as test-range. If omitted, test-range is used.
    I hope this helps.
    - Michael
    Message was edited by: Apple fan Michael

  • Addition of  Start & end date fields in the View 'My team's open leads' .

    Dear all,
                 I want to add Lead Sart date & Expected  End date in the personalize list of view 'My team's open Leads' in the Overview page of Lead management
      I tried it by changing the field name in PDVField as                                           LEAD_DATE_START/visibility=false ' for start date in the detailed view of I view ' 'My team's open leads'.But it is not reflecting in Personalize list of fields.
    Can any body give solution to this ASAP as it is high priority requirement.
    Maximum points would be rewarded for solution.
    Regards,
    Basavaraj V.Patil

    Hi,
    I have a similar problem.  There appear to be some configurable attributes in the iview such as 'PDVField' and 'Column'. The PDVField attribute contains values such as 'QUAL_LEVEL_MAN_TXT/visibility=true'. When running the iview, this field is visible. However when I change this setting to false, the field is still visible. There is a PDVCachingOn field and this I have set to false however this also seems to make no difference.
    Regarding the 'column' field, I have no idea what can be done here as the initial value is blank.
    The suggestion in the post above requires customising the standard iView. That may be the case, but clearly the purpose of these 'configurable' attributes does not seem to be very clear.
    Mr.T

  • PWA 2007: Progress field in the view "my assignments": I cant enter time in the days because appears locked

    Hi!
    I am having the following trouble in Project Server 2007(any help is much appreciated):
    In the view "my assignments", where the persons report the time worked each day in the projects,
    some days of some projects appear locked and dont allow to enter any value and I have not
    realized if there is some special configuration on the server that allows to lock the days  of
    the field "progress" in "my assignments" view so that no one can report the times worked.
    Thanks!

    Hi,
    seems that you do not force tracking method on server, so PMs can choose. So a project can have percent complete or Actual and Remaining Work as method.
    Open your project, go to Collaboration (hopefully the correct translation, currently no English system available) - Collaboration Options.
    I assume that in last section, option 1 or 2 is selected. Select option 3 and publish your project. Afterwards, users should be able to enter their time by day for this project.
    To force PMs to use this method, go to Server Settings - Task Settings and Display. Select "Hours of work done per period" and check "Force project managers to use the progress reporting method specified above for all projects".
    Does that work?
    Barbara
    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find
    an appropriate solution faster. Thanks for your support!

  • How to add a field in the view not in context node

    Hi All,
            I want to add a new field in one of my views. The problem is that the field does not exist in the context node. I have checked in the BOL model there it comes under another root object. I would  like to know whether it is possible to add the field from another root object.
    can you please help to me to solve this issue.
    Advance Thanks & Regards
    Sujith

    Hi Ashish,
                  I will give a detailed explanation of my requirement. I am working in ICWEB client for utility services, In this case for a particular view in the bsp application CRM_IUFCS_IC/View1.htm i want to add a field but the field is not the context nodes, or any of the related entities in the BOl Model. But its in  another root object in the BOL Model. So i would like to know how can i add this field into my layout.
    e.g.:let context node in view to be modified is buag and the field to be added is under BuilHeader object. This is the scenario.
    Advance Thanks,
    Sujith

  • How to hide the field from the view in the webdynpro application?

    Hi Gurus,
    I got a requirement where in which ,default layout has the field name Time.......To......... which is (2 input box ) and one lable assigned to the container.........
    Now my requirement is to hide this field from the layout for all cases of leave......(all types of leave)....
    I got a few inputs from forum that we can achieve this by implementing the following steps..........
    Create In context => Value attribute => Say Visibility
    Go to its properties
    Select com.sap.ide.webdynpro.uielementdefinitions.Visibility
    In View Layout
    Select UI Element Set Visible property to this context variable Visibility.
    In wdDoModifyView() You can set this property to false
    wdContext.currentContextElement().setVisibility(false);
    Can you people tell me where to create the value attribute........
    In the view context or in the component context...........
    and field that am talking about is assign to the container you want me to assign this context variable property to all ......Like to input box ,label and the container..........
    Please calrify this ASAP...........
    Thanks in Advance,
    Dharani

    Hi Manoj......
    Hi Murutuza,
    As per your guidelines I have created the value attribute in View context (which has the field..... which needs to be hide)inside the value node say FieldVisibility.......and attribute name OldTimeDuration......and I set this value with uidefeneitions Visibility .......
    and I bind this vaule with the field property visible(Time.......To..........)which I need to hide...........
    Now in the view implementation tab ..........I have coded in the doinit method(since my requirement to hide the field from the layout in all cases).........
    wdContext.currentFieldVisibilityElement().setOldTimeDuration(WDVisibility.NONE);
    But if I deploy the application and see still am getting the same field dispalying in the screen.........
    I even tried putting this code in wdmodifyview method.........same results........
    Kindly tell me how to hide the field permenantly from the screen............(without any conditions.)
    Thanks in Advance,
    Dharani

  • Question: How to handle or rename lable of fields of the view configuratio?

    Hello,
    Ive a question about how to rename or use my fields/lables of the view configuration.
    I placed two fields there and set a field description for the lable. But the problem is that it isnt multilingual. So I want to set this description or lable with an OTR text.
    Where and how can I do that?
    Best Regards,
    Marcus

    Hi Marcus,
    You can try the following for translation purpose:
    Translation
    You can use a dedicated transaction to translate field labels and captions that have been changed.
    Example
    You have changed field labels and captions on the opportunity overview page (application component BT111H_OPPT) and on the opportunity search page (application component BT111S_OPPT), in the UI configuration in transaction BSP_WD_CMPWB. You want to translate the changes that you have made in the views.
    End of the example.
    Activities
    Finding Out the Context ID
    Before you start the translation, you need to find out the context ID in the corresponding configuration.
    Start the BSP Component Workbench.
    Select the UI component and the view that you want to translate.
    Click the Configuration tab, and click Choose Configuration.
    In the Configuration Selection, you can choose a context ID.
    Note
    Alternatively, you can find out the context ID in the Technical Data dialog of the CRM WebClient UI. You can start the Technical Data dialog with the F2 key. You can find the context ID in the technical information about the configuration at runtime.
    End of the note.
    Translating by Using the Context ID
    Start transaction SE63.
    You see the page Initial Screen: Standard Translation Environment.
    Enter BSP2 in the transaction code field.
    You see the page ABAP Short Texts: BSP Layout Texts (Client-Dependent).
    In the field Object Name, enter the context ID, which you have found out beforehand.
    Choose the source language and target language, English as the source language and German as the target language, for example.
    Click Edit to translate the object.
    Save your entries.
    Translating by Using the Collection
    You can also use the collection for translation purposes. The collection technically corresponds to the package, which you can find out in the Technical Data dialog of the CRM WebClient UI. You can start the Technical Data dialog with the F2 key. The package name is available at the technical information about the UI component.
    Start transaction SE63.
    You see the page Initial Screen: Standard Translation Environment.
    Enter BSP2 in the transaction code field.
    You see the page ABAP Short Texts: BSP Layout Texts (Client-Dependent).
    In the field Object Name, press F4 to start the input help.
    In the field Collection, enter the collection/package that you found out beforehand.
    You see a list with all context IDs that belong to this collection. Every configuration has its own context ID.
    Click the RIGHT ARROW key with the quick info text Next Variant to see the corresponding view names.
    Select the view that you want to translate.
    Choose the source language and the target language.
    Click Edit to translate the object.
    Save your entries.
    Regards
    Ajay

Maybe you are looking for

  • Quirks and problems after a restore from Time Machine

    I had need to restore from Time Machine. It did the job, but it wasn't as easy as restoring from SuperDuper. Apple iTunes Store passwords and iTunes registrations were all lost, requiring me to re-enter passwords for the various users' authorizations

  • ITunes / iPod touch not syncing correctly

    I'm having two problems at the moment, the first of which is an error which comes up while syncing the mail accounts to my iPod. The following message (http://www.moventouch.com/itunes.png) comes up (the part which has been blanked out contained my n

  • How to use SUBMIT on Programme RDDm0001 (SE10)

    Hi All, I am trying to call this program using submit with return passing the transport request ID TRKORR How can I find out how to successfully call the program? thanks

  • Need efficient queries to retrieve reports inside a folder

    Case 1: To retrieve reports in a particular folder - I am currently using 2 queries - a) retrieving parentid given a folder name b) retrieving all reports given the above parent id. Can I combine these into 1 query ? Case 2: I also need to retrieve a

  • Can you trade an iPhone3GS for a 4G?

    Can you trade an iPhone3GS for an iPhone4G?