• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1927
  • Last Modified:

Access Group Header to repeat for the detail section only (not with a Group Footer)

I have a group header on a report which I only want to repeat for the detail section.  We have a separate Group Footer section with its own header and detail.

How can I get a Group Header to repeat for the detail but not for a specific Group Footer?  What event do I put this code?

Thanks
0
quizzer
Asked:
quizzer
  • 5
  • 4
1 Solution
 
OnALearningCurveCommented:
Hi quizzer,

You could try doing this using code in the "On Format" property of the "Sepcific Group Footer"

For example if you Group header has a single lable in it called LABLE1 then you could add the line

Me.LABLE1.Visible = False

against the On Format property of you group footer.  If you also set the Can Shrink Property of the group header to yes then is should dissapear when the group footer is displayed.

I Hope this helps,

Mark.
0
 
quizzerAuthor Commented:
I have a Group Footer named GroupFooter1, that is set up as an Entire page with Labels and Lines and is the last Page printed for each group.

I just cannot have the Group Header named GroupHeader0 pint its labels above this section.  It throws everything off

I have GroupHeader0 then Detail Then GroupFooter0.  I want Group Header0 to repeat over Detail and GroupFooter0.  But not over GroupFooter1.  Right now when the length of the detail records is one page it prints perfectly.  I juts need code to get GroupHeader0 to not display over GroupFooter1.

Thanks
0
 
quizzerAuthor Commented:
I set a running sum over the group in a Text Box named TxtLineCnt .  Basically as long as TxtLineCnt is >0 in the Detail section I want GroupHeader0 to show.  Just where would I put this OnPrint  OnFormat  Do i need RepeatSection????

If Me.TxtLineCnt > 0 Then
Me.GroupHeader0.Visible = True
Else
Me.GroupHeader0.Visible = False
End If
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
quizzerAuthor Commented:
OK here is the deal

I have a GroupHeader0

Just has labels

Detail
has data may be 1 or more pages in length

GroupFooter0
has a subreport which prints a correct number of blank lines based on conditions

GroupFooter1
has some special formatting and lables and is basically a standalone page.  Set Force new Page to Before Section

Everything works just fine except if the detail section is more than one page.  If I set Repeat Section to False on GroupHeader0 everything is fine except for the single page of detail records, but it leaves no labels above the detail records for Page 2 and Beyond

When I set the Repeat Section to True in GroupHeader0 it puts a Group Header in front of everything, including my GroupFooter1 section where I do not want it to appear.

I just want it to stop repeating for GroupFooter1
0
 
OnALearningCurveCommented:
Hi quizzer,

Sorry for the delay but did not get onto my PC lst night.

Right If I have understood your comments correctly above I have created a test version of you reoport and I think I have cracked it.

GroupHeader0: has the RepeatSection property set to yes.

GroupFooter1: is set to force new page before section.

Now in the "On Format" property for GroupFooter0 add the line of code:

Me.GroupHeader0.Visible = False

This way when the GroupFooter0 is displayed it will set the GroupHeader0 to be invisible and just after the GroupFooter0 is displayed a new page is forced by GroupFooter1 and it will be displayed without GroupHeader0 which is now set to not visible.

I hope this makes sense!

Mark.
0
 
quizzerAuthor Commented:
When I do that it turns off the Group Header everywhere there is no longer a Visible Group Header.

GroupHeader0 no longer displays at all.  Is there some sort of Conditional formatting if there is some data present in the Control TxtLineCnt display GroupHeader0 else do not
0
 
quizzerAuthor Commented:
Could I use the report's OnPage Event so that if the control TxtLineCnt is visible GroupHeader0 is Visible and if TxtLineCnt is not visible  GroupHeader0 is Not Visible
0
 
OnALearningCurveCommented:
Hi Quizzer,

Sorry for the lack of response but I have been away for a while.

Would it be possible to upload a copy of sample of your database with the report included for me to take a look at?

Cheers,

Mark.
0
 
OnALearningCurveCommented:
Hi Quizzer, thanks for the points!

Did you manage to resolve your problem in the end?

Mark.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now