Is there a GroupHeading in the current page

dlamarche

New member
Local time
Tomorrow, 07:16
Joined
Oct 11, 2008
Messages
5
Hello,

I am looking for a technique in VBA to find out if a page in a report do show the GroupHeading.

The reason is that if the Details for a Group level overflows on the next page I need to do something on that second page. The same if there is enough details to print that Group on three pages.

On the other hand I do not want to do that task on the page containing the GroupHeading

I have looked at the Page Event property and a few other but it always return True since the Report contains one group level. As I mentionned I am interested in the page being printed.

Thanks,

Dlamarche
 
In the properties for the group heading there is an attribute called Repeat Section. Set this to Yes.

hth
Chris
 
I know very well this property and this is not related at all to my question.

Now allow me to ask my question again. It is a VBA question. I am trying to find out in code if the page being printed contains the Group Header.

The details section for a Group can span over several page and I would like to know if the current page is the first of the group or one of the other pages.

Thanks you,

DLamarche
 
Last edited:
I agree I completely misread the essence of your question, my apologies.

If I now understand your question, then take a look at the attached. Hopefully I've understood your requirements this time. Hopefully it's self explanatory.

hth
Chris
 

Attachments

Last edited:
I better just qualify the example. If you run Report2, you will see that when a group runs on to the next page, a message is displayed at the top of that page. If not then no message. Obviously you can change the action to whatever you want.
Chris
 
Hi Stopher,

Thanks for this sample. It would do the job for sure. Interesting that it resemble the approach I had in mind but I was working with the Page event (made sense to me). Using the Group Headers and Page Header events does the job.

This seems to look like an old exercise I did years ago where a section that would overflow on the next page could print something like 'Product A (cont'd)' at the top of the following pages.

Thanks again you have made my day.

DLamarche
 
Last edited:

Users who are viewing this thread

Back
Top Bottom