Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making group header even with first line of detail? 1

Status
Not open for further replies.

mwa

Programmer
Jul 12, 2002
507
US
I want to make a group header even with the first line of the detail section:

group 1 Detail Line 1
Detail Line 2
Detail Line 3
group 2 Detail Line 1
Detail Line 2
Detail Line 3

Anybody have any ideas as to how to do this????

Thanks in advance,
mwa
 
OK... I figured this out.... I'm not sure if it is the right way but it worked:

In the report header, make a formula field that declares a numbervariable:
global numbervar x;

In the group header, make a formula that resets the numbervariable to 0:
global numbervar x;
whileprintingrecords;
x := 0;

Then in the detail section, make aformula that increments the variable by 1:
global numbervar x;
whileprintingrecords;
x:=x+1;

then put the groupname field in the dtails section and use this to suppress it if it is not the frist record:
global numbervar x;
if x = 1 then false else true;


Hope that helps someone out in the future...
mwa
 
Hi mwa,

Maybe I'm missing something, but I think you have two other
options without using a print time formula:

1-Group {yourgroupfield} and also put {yourgroupfield} in the details section. Suppress the group header. In the details section, format {yourgroupfield} by checking "suppress duplicates." Or,

2-Group {yourgroupfield} and in the format group section editor, check "underlay following section" for the group header section. Details will then print in line with the group header.

Just a thought (or two)--

-LB
 
Thanks LB...

Like a said at the top of my second post, I didn't know if that was the right way (or best way) to do that. Your way looks much simpler... For that, you get a star... I'll keep those ideas in mind for future reference...

Have a good one...
mwa
 
There is a much easier way: Do a normal group header and just format the group header section with underlay following sections.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top