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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group/Sort on Formulas

Status
Not open for further replies.

xmj0908

MIS
Dec 6, 2011
6
US
I have a report that I have grouped it by name first and insert a sum(hours A), another sum(hours B), created a formula field = Sum(Hours A) + Sum(Hours B), so now I would like to have the report in the descending order based on the formula field, but I can't find the formula field in the group sort expert. Does anyone know how to do that? Thank you very much.

 

For group sort to work, I believe the sum has to be created using the Sum tool. I didn't test, but if you created a formula Hours A + Hours B, then created a summary on that formula then it should be available for group sorting.


 
briangriffin,

Thank you for your reply. However, I can't sum by the formula field either, when I tried to insert a summary, I can't find the formula field in the "choose the field to summarize" field. Is there any other ways that you can think of? Thank you!

 

No reason that shouldn't work, I just tested it. Your formula field is only:

Hours A + Hours B

?? No summing going on in the formula, right?
 
Oh, my formula field = SUM(hours A) + SUM(hours B). Thanks!

 
i may be missing the obvious but i dont see a grouping indication...

shouldnt the formula look like

Sum({Hours A},{name}) + Sum({Hours B},{name})


_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 

Put the formula in the Details section (you can remove it later if you want). Click once to hilite it, then click the Sum button. Select Sum, and GF1 for the location. It should drop right into the footer.

 
your formula looks exactly like that?

SUM(hours A) + SUM(hours B)

??


_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 

If there is summarization in the formula, then I don't think you'll be able to use it in the group sort. Add hours A and B together, then sum that formula.
 
I am certain you are right bg ... I think I just got confused with the syntax of the post .. if hours a and hours b are DB fields (or even if they are formulas, but in that case I would like to see the formulas).. I think formula like this

{hours A} + {hours B} .. placed in details then right click and summarize as you described above should provide a field that group sorting can be performed on...

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top