Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008

    Unanswered: Cannot Summarized the formula field

    I am newbie for Crystal Report and I was encountered some problem to display a record that I want. There is the scenario:-

    I got 3 level of report
    1. Main Report
    2. Sub-Report
    3. Details

    There is a formula field in sub-report that count a duration for activity:

    @Actual Duration
    Local numberVar durationSecond := DateDiff ("s", {dataSource.Start_Date_and_TimeActivity Execution9}, {@Max End Date});
    Local numberVar iSecond := durationSecond mod 60;
    Local numberVar iHour := durationSecond \ 60;
    Local numberVar iMinutes := iHour mod 60;
    iHour := iHour \ 60;
    ToText(iHour, "00", 0) & ":" & ToText(iMinutes, "00", 0) & ":" & ToText(iSecond, "00", 0);


    Name Start Time End Time Actual Duration
    Activity A 10:00AM 11:30AM 1:30:00
    Activity B 10:00AM 11:50AM 1:50:00
    Activity C 10:00AM 11:55AM 1:55:00

    So, now I would like to total up the actual duration for these three activity (total = 5:15:00) and display it in Main report. But, it prompt the error message: "This field cannot be summarized"

    Any idea?

    Thank you.....
    Last edited by db_info; 03-03-11 at 02:36.

  2. #2
    Join Date
    Dec 2004
    The reason you can't summarize this field is because you've made it a text field. It's like trying to add "John" and Paul".

    You can make a new field that will sum the variable durationSecond, since it's already defined as a number field. Once you have that, you can format it the same way you did with @Actual Duration.

Posting Permissions

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