The following assumes that you want do add the extra lines and the end of a group. Create these formulas:
//{@reset} to be placed in the group header:
whileprintingrecords;
numbervar cnt := 0;
stringvar x := "";
//{@addlines} to be placed in the detail section and used to return the record count:
whileprintingrecords;
numbervar cnt;
stringvar x;
numbervar i;
numbervar j := 40;
if not onlastrecord and
(
{table.groupfield} = next({table.groupfield}) or
count({table.groupfield},{table.groupfield}) >= j
) then (
cnt := cnt + 1;
x := totext(cnt,0,"")
);
if (
onlastrecord
or
{table.groupfield} <> next({table.groupfield})
) and
count({table.groupfield},{table.groupfield}) < j then (
cnt := cnt + 1;
(
for i := 1 to j-count({table.groupfield},{table.groupfield})+1 do(
x := x + chr(13)+totext(cnt,0,"")+'____________'+"Tech";
cnt := cnt + 1;
))
);
if instr(x,chr(13))<> 0 then
mid(x,instr(x,chr(13))+1) else
x;
Place this in the detail section and format it to "can grow". Also format it to "tight horizontal" on the border. Since the formula will replace the actual last detail record, whatever you place in the regular detail section needs to be built into the formula where the blank line +"tech" is, and then the regular detail fields need to be suppressed with a formula like this so they don't overlap on the last record:
onlastrecord or
{table.groupfield} <> next({table.groupfield})
-LB