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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting group "keep together" troubles

Status
Not open for further replies.

evilmousse

Programmer
Apr 15, 2003
85
US
I have a report with 2 grouping levels,
first region, then clientID.
I want a report to be formatted as follows:

region cliID dtl1 dtl2 dtl3
dtl1 dtl2 dtl3
dtl1 dtl2 dtl3
cliID dtl1 dtl2 dtl3
cliID dtl1 dtl2 dtl3
region cliID dtl1 dtl2 dtl3
dtl1 dtl2 dtl3
etcetc

ie, i want the group header info on the same
line as the first detail displayed.
I currently use the following code to accomplish
this (i reference hidden controls in each section's
group header to set unbound textboxs that reside
on the same line as the detail info):

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If (txt_SalesRegion = txt_HdnSalesRegion) Then
txt_SalesRegion.Visible = False
Else
txt_SalesRegion = txt_HdnSalesRegion
txt_SalesRegion.Visible = True
End If
If (txt_ClientID = txt_HdnClientID) Then
txt_ClientID.Visible = False
txt_CName.Visible = False
Else
txt_ClientID = txt_HdnClientID
txt_ClientID.Visible = True
txt_CName.Visible = True
End If
End Sub

now this all works correctly until I set
the group keep together for the inner of
the two groups, clientID. afterward, only
the very first client id in the region will
have the clientID info displayed correctly,
the rest will be blank. Near as I can tell,
it goes back to reformat the line, and the
next time it passes through, the inequality
i count on when moving from one cliID to the
next isn't there. so i guess i shoud hook
it's displaying to another condition.

any suggestions?

-g
 
Got my answer on another posting,
I'll share the answer here:

I set the "hide duplicates" setting for
the clientID field to yes.

interestingly enough, that same technique
doesn't work on it's superior group,
salesregion. luckily a combination of
my original technique on the salesregion
group and the new setting on the clientID
group gets me what i need.

-g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top