Thanks to LBass the formula below works great. I can compare whatever record I want against another. Now the requirements changed and they want to compare multiple records. For instance I have records 1 and 4 comparing and they love it. Now they want 1 and 4, 2 and 5, 3 and 6... It is not a set number. I could have 10 records or 100 records. All must display.
So I currently display : Yesterday: 1.6 Today: 1.8
Now they want:
Recommended: 1.6 Current: 1.8
Recommended: 1.9 Current: 1.1
Recommended: 1.6 Current: 1.6
Recommended: 2.1 Current: 1.8
Thoughts?
//{@reset} for the client group header:
whileprintingrecords;
numbervar curr;
numbervar prev;
numbervar cnt;
if not inrepeatedgroupheader then (curr := 0;prev := 0;cnt := 0);
//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
numbervar curr;
numbervar prev;
numbervar cnt := cnt + 1;
if cnt = 2 thencurr := {table.value};
if cnt = 3 thenprev := {table.value};
//{@result} to be placed in the client group footer:
whileprintingrecords;
numbervar curr;
numbervar prev;
"Yesterday's Value: "+totext(prev,0,"")+"Today's Value: "+totext(curr,0,"")
So I currently display : Yesterday: 1.6 Today: 1.8
Now they want:
Recommended: 1.6 Current: 1.8
Recommended: 1.9 Current: 1.1
Recommended: 1.6 Current: 1.6
Recommended: 2.1 Current: 1.8
Thoughts?
//{@reset} for the client group header:
whileprintingrecords;
numbervar curr;
numbervar prev;
numbervar cnt;
if not inrepeatedgroupheader then (curr := 0;prev := 0;cnt := 0);
//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
numbervar curr;
numbervar prev;
numbervar cnt := cnt + 1;
if cnt = 2 thencurr := {table.value};
if cnt = 3 thenprev := {table.value};
//{@result} to be placed in the client group footer:
whileprintingrecords;
numbervar curr;
numbervar prev;
"Yesterday's Value: "+totext(prev,0,"")+"Today's Value: "+totext(curr,0,"")