CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008

    Summing a field for several periods

    I want to sum up the field call cost for all periods less than and equal to the period chosen. For example, the table information is as follows:

    PeriodID Cost
    0 200
    1 100
    2 200
    3 100
    4 200
    5 600

    Therefore, if period 4 is chosen then I want to sum the cost for period 4, 3,2,1 and 0. How can I do this in Crystal?

  2. #2
    Join Date
    Jul 2005

    Re: Summing a field for several periods

    You could try inserting a RunningTotal and the condition (choosen period) could be an input parameter or a formula

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.