Okay, then you can't use a SQL expression. You can create a faux crosstab by using a running total. Create two formulas:
//{@accum} to be placed in the group header for claim:
whileprintingrecords;
numbervar x4;
numbervar x3;
numbervar x2;
numbervar x1;
numbervar x0;
if maximum({@location},{table.claim}) = 4 then x4 := x4 + 1;
if maximum({@location},{table.claim}) = 3 then x3 := x3 + 1;
if maximum({@location},{table.claim}) = 2 then x2 := x2 + 1;
if maximum({@location},{table.claim}) = 1 then x1 := x1 + 1;
if maximum({@location},{table.claim}) = 0 then x0 := x0 + 1;
//{@display} to be placed in the report footer:
whileprintingrecords;
numbervar x4;
numbervar x3;
numbervar x2;
numbervar x1;
numbervar x0;
"Location 4" + replicatestring(" ", 8 - len(totext(x4))) + totext(x4,0,"") + chr(13) +
"Location 3" + replicatestring(" ", 8 - len(totext(x3))) + totext(x3,0,"") + chr(13) +
"Location 2" + replicatestring(" ", 8 - len(totext(x2))) + totext(x2,0,"") + chr(13) +
"Location 1" + replicatestring(" ", 8 - len(totext(x1))) + totext(x1,0,"") + chr(13) +
"Location 0" + replicatestring(" ", 8 - len(totext(x0))) + totext(x0,0,"")
Format {@display} to "Can grow} (right click->format field->common->can grow). If you change the font to a non-proportional font like Courier, the columns will align correctly. You can adjust the spacing by making the "8" larger or smaller. Of course, you could also lay this out using text boxes for your row labels and separate display formulas for each of the summary values, as in:
//{@x4display}:
whileprintingrecords;
numbervar x4;
-LB