May 16, 2012 #1 grecon Technical User Mar 8, 2007 78 US I keep getting an error the ) is missing but I can't figure out where sum(({ORDERHDR.ORDER_TOT})where year = '2012') -sum ({ORDERHDR.ORDER_TOT}where year = '2011'))
I keep getting an error the ) is missing but I can't figure out where sum(({ORDERHDR.ORDER_TOT})where year = '2012') -sum ({ORDERHDR.ORDER_TOT}where year = '2011'))
May 16, 2012 #2 CoSpringsGuy IS-IT--Management Aug 9, 2007 955 US NOT SURE ABOUT THE FORMULA AS A WHOLE BUT YOU NEED ANOTHER ) AFTER THE SECOND sum ({ORDERHDR.ORDER_TOT} _____________________________________ Crystal Reports 2008 and XI Intersystems Cache 2012 ODBC connection Upvote 0 Downvote
NOT SURE ABOUT THE FORMULA AS A WHOLE BUT YOU NEED ANOTHER ) AFTER THE SECOND sum ({ORDERHDR.ORDER_TOT} _____________________________________ Crystal Reports 2008 and XI Intersystems Cache 2012 ODBC connection
May 17, 2012 #3 Madawc Programmer Sep 5, 2002 7,628 GB sum ({ORDERHDR.ORDER_TOT}where year = '2011')) should be sum ({ORDERHDR.ORDER_TOT})where year = '2011')) Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP Upvote 0 Downvote
sum ({ORDERHDR.ORDER_TOT}where year = '2011')) should be sum ({ORDERHDR.ORDER_TOT})where year = '2011')) Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP
May 17, 2012 #4 Madawc Programmer Sep 5, 2002 7,628 GB sum ({ORDERHDR.ORDER_TOT}where year = '2011')) should be sum ({ORDERHDR.ORDER_TOT})where year = '2011') Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP Upvote 0 Downvote
sum ({ORDERHDR.ORDER_TOT}where year = '2011')) should be sum ({ORDERHDR.ORDER_TOT})where year = '2011') Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP
May 17, 2012 #5 Madawc Programmer Sep 5, 2002 7,628 GB sum ({ORDERHDR.ORDER_TOT}where year = '2011')) should be sum ({ORDERHDR.ORDER_TOT})where year = '2011') Maybe easier if you define them as named sum fields. The use of Crystal's automated totals is outlined at FAQ767-6524. Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP Upvote 0 Downvote
sum ({ORDERHDR.ORDER_TOT}where year = '2011')) should be sum ({ORDERHDR.ORDER_TOT})where year = '2011') Maybe easier if you define them as named sum fields. The use of Crystal's automated totals is outlined at FAQ767-6524. Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP
May 17, 2012 #6 Madawc Programmer Sep 5, 2002 7,628 GB Sorry about the repetition. The new replies system is an improvement but seems not to let you know when it has successfully posted. Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP Upvote 0 Downvote
Sorry about the repetition. The new replies system is an improvement but seems not to let you know when it has successfully posted. Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP
May 19, 2012 #7 lbass Technical User Feb 9, 2002 32,816 US Where are you trying to put this formula? It won't work. You need to make formulas like this: //{@2011tot}: if {table.date} =2011 then {ORDERHDR.ORDER_TOT} //{@2012tot}: if {table.date} =2012 then {ORDERHDR.ORDER_TOT} Then in the report footer, use: sum({@2012tot})-sum({@2011tot}) If you are doing this at some group level, you would have to add in a group condition and place in a group header or group footer: sum({@2012tot},{table.groupfield})-sum({@2011tot},{table.groupfield}) -LB Upvote 0 Downvote
Where are you trying to put this formula? It won't work. You need to make formulas like this: //{@2011tot}: if {table.date} =2011 then {ORDERHDR.ORDER_TOT} //{@2012tot}: if {table.date} =2012 then {ORDERHDR.ORDER_TOT} Then in the report footer, use: sum({@2012tot})-sum({@2011tot}) If you are doing this at some group level, you would have to add in a group condition and place in a group header or group footer: sum({@2012tot},{table.groupfield})-sum({@2011tot},{table.groupfield}) -LB