In amongst a larger procedure I have this code snippet:
ifselect CB ≠ "DLCSI" field OnSite total field OffSite total TotOnSiteBody = pattern(OnSite,"#.##") removesummaries 7 endif ifselect CB = "DLCSI" field OnSite total field OffSite total endif ifselect CB = "DLCSI" field OnSite total endif
You can see that I’m totalling one data selection, removing the summary record and then totalling another data selection. If the data sheet is not open when I run the code, the summary record can be still attached to the first selection and not visible in the second selection, depending on whether or not I comment out one or more of the three indented lines of code.
Could somebody please see if they can replicate any of this? There doesn’t seem to be a pattern to it and I’ve spent so long looking for one that my head hurts. Everything seems to work well if the data sheet is open.