Sep 12, 2007 #1 zemp Programmer Jan 27, 2002 3,301 CA CR XI I have a report in which I have a formula to increment a shared variable in the GH1. GH1 is set to repeat on each page. I would like my formula to ecexute only when GH1 changes and not every time GH1 prints. Is there a way to achieve this? zemp
CR XI I have a report in which I have a formula to increment a shared variable in the GH1. GH1 is set to repeat on each page. I would like my formula to ecexute only when GH1 changes and not every time GH1 prints. Is there a way to achieve this? zemp
Sep 12, 2007 1 #2 synapsevampire Programmer Mar 23, 2002 20,180 US Try: whileprintingrecords; numbervar MyNumber; If previous({table.groupedbyfield}) <> {table.groupedbyfield} then MyNumber:=MyNumber+1; MyNumber -k Upvote 0 Downvote
Try: whileprintingrecords; numbervar MyNumber; If previous({table.groupedbyfield}) <> {table.groupedbyfield} then MyNumber:=MyNumber+1; MyNumber -k
Sep 12, 2007 1 #3 lbass Technical User Feb 9, 2002 32,818 US Or you could use the function: inrepeatedgroupheader, as in: whileprintingrecords; numbervar MyNumber; If not inrepeatedgroupheader then MyNumber:=MyNumber+1; MyNumber -LB Upvote 0 Downvote
Or you could use the function: inrepeatedgroupheader, as in: whileprintingrecords; numbervar MyNumber; If not inrepeatedgroupheader then MyNumber:=MyNumber+1; MyNumber -LB
Sep 12, 2007 1 #4 IdoMillet Instructor Feb 6, 2001 5,290 US Crystal provides a nice special expression for this (InRepeatedGroupHeader). Using this expression, here's an alternative approach: Code: whileprintingrecords; shared numbervar MyNumber; If Not InRepeatedGroupHeader then MyNumber:=MyNumber+1; MyNumber - Ido view, e-mail, export, burst, distribute, and schedule Crystal Reports. http://www.MilletSoftware.com Upvote 0 Downvote
Crystal provides a nice special expression for this (InRepeatedGroupHeader). Using this expression, here's an alternative approach: Code: whileprintingrecords; shared numbervar MyNumber; If Not InRepeatedGroupHeader then MyNumber:=MyNumber+1; MyNumber - Ido view, e-mail, export, burst, distribute, and schedule Crystal Reports. http://www.MilletSoftware.com
Sep 12, 2007 #5 lbass Technical User Feb 9, 2002 32,818 US Oops, yes, that should be "shared numbervar". -LB Upvote 0 Downvote
Sep 12, 2007 Thread starter #6 zemp Programmer Jan 27, 2002 3,301 CA Thanks again, that did the trick. zemp Upvote 0 Downvote