If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Cannot Summarized the formula field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-11, 02:18
db_info db_info is offline
Registered User
 
Join Date: Jan 2008
Posts: 1
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);

Example:

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.
Reply With Quote
  #2 (permalink)  
Old 03-09-11, 14:57
trowe trowe is offline
Registered User
 
Join Date: Dec 2004
Location: Connecticut
Posts: 85
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On