Hi,
I have a report, which some of you may have heard about, that is driving me crazy.
I'm rebuilding, from scratch, a report that is known to be inaccurate.
The groupings are: largedim, smalldim; barcode.
largedim and smalldim will always be the same for a given barcode (ettikettnr), so barcodes will always be grouped together.
I'm using a variable to save the previous barcode to compare whether to set a value to zero (at the detail line):
global stringvar etikettnr1;
global numbervar squarefeet1;
global numbervar squarefeettotal1;
if {awbar_historie.etikettnr} = etikettnr1
then squarefeet1 := 0
else squarefeet1 := (({pool_teile.breite}/304800) * ({pool_teile.hoehe}/304800));
squarefeettotal1 := squarefeettotal1 + squarefeet1;
etikettnr1 := {awbar_historie.etikettnr};
squarefeet1;
I'm also using a Running Total at the Report Footer
Every time I refresh, I come up with slightly different results.
Exporting to Excel, I can verify that the total is doing okay, but the issue is that sometimes on the detail with a duplicate barcode (etikettnr), squarefeet1 is not set to 0.
If I add whileprintingrecords, I get an error that a running total cannot refer to a print time formula. Similar if I use a Summary.
If I add whilereadingrecords, it does not vary from one refresh to the next, but there are still times when it is not setting squarefeet1 to 0.
Excuse me if I may have forgotten a detail, but this if frazzling me.
From my experience, very straightforward, and built from scratch, so I know there's no extraneous code embedded somewhere.
Halp!