Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ToText Formula using Summing and a Group

Status
Not open for further replies.

dbielenda

MIS
Nov 15, 2001
119
US
I need help to have this formula work:

ToText(((Sum ({TIME.DTLTMA},{DATE.RSHPJA})\60) Mod 24),0) + 'h, ' +
ToText((Sum ({TIME.DTLTMA}, {DATE.RSHPJA}) Mod 60),0) + 'm'

When I check it, it gives me "No Errors". However, when I refresh the report, I get this error, "Group specified on a non-recurring field." I would like to sum by the DTLTMA, which is a time stored in the database as minutes, by the group RSHPJA. Any suggestions?

Thank you very much s-)
 
You do not show how your data is grouped butit it is like this it should be no problem


Group1H ( by {DATE.RSHPJA})
details ( place this field is you want it displayed)
{TIME.DTLTMA} - although it is not necessary
for the sum
Group 1F (Your formula listed in your post)


ToText(((Sum ({TIME.DTLTMA},{DATE.RSHPJA})\60) Mod 24),0) + 'h,

I am not sure what you are trying for here....

Sum ({TIME.DTLTMA},{DATE.RSHPJA})\60 gives you the number of hours of data....what is the purporse of doing a "Mod 24" on this number....you are getting the fraction left over after dividing by 24 which would I guess be the fraction of a 24 hr. day....but you call it "h" for hours??

Similarly with minutes what you get is the fraction of an hour from that calculation and call it "m" for Minutes??

Jim
 
Ngolem,

Thanks for your response.. I will try to make my question a bit clearer. Here is how my report looks:

Ship Date Estimated Time
---------- --------------
4/25/01 0h, 6m
12/11/01 0h, 6m --> This should be 0h, 36m because
there are more than one shipments

TOTAL: 0h, 42m -->this grand total is coming out
correctly adding 6+36.

I want to sum the time by the group Ship Date. The Ship Date and the Estimated Time are in group headers. The "h" does stand for hours and the "m" does stand for minutes.

Does this make it clearer if not, then I will clarify better. Sometimes its hard to post the report, but I tried my best. s-) Thank you!
 
When you say it should be oh 36m because there are more than 1 shipment, how do you come up with that? Should it be 36m if there are 2 to infinity shipments? I do not understand. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
All I have on this report are these two fields (DTLTMA and RSHPJA) from one table. I just realized that my post has two seperate tablenames. I see where I was confusing everyone! EEKK, I'm sorry :( I just dragged and dropped the ship date and the estimated time from one table.
 
if you have no groups on this table then create one along the following guidelines...this should help you

Group1H ( by {RSHPJA})
details ( place this field is you want it displayed)
{DTLTMA} - although it is not necessary
for the sum
Group 1F (Your formula listed in your post)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top