Force New Page (1 Viewer)

Hemish

Registered User.
Local time
Today, 06:03
Joined
Jan 20, 2005
Messages
65
Hi,

I have a report with Force New Page, what i don't want to happen is if its the last record in the group report then i do not want to force a new page. Want to try keeping that group together.

I have 3 groups for footers below is the groups which i have set force new page after section

Suppliers
Customers
Orders

At the moment after the grouping for customers its creating a new page after Order group where i would like the customer total on the same page as it was the last record for that group.

Thanks

Hemish
 

vbaInet

AWF VIP
Local time
Today, 06:03
Joined
Jan 22, 2010
Messages
26,374
Code:
If Me.Page = Me.Pages Then
    Me.SectionName.ForceNewPage = [COLOR=Blue]0[/COLOR]
Else
    Me.SectionName.ForceNewPage = [COLOR=Blue]X[/COLOR]
End If
where X is the number corresponding to your original Force New Page selection.

0 = None
1 = Before Section
2 = After Section
3 = Before & After
 

Hemish

Registered User.
Local time
Today, 06:03
Joined
Jan 20, 2005
Messages
65
Hi thank you for your reply the code works but does not work on the last record of that group.

eg

Group

Sup -- Cust -- ORDER -- Product

SupTest1 -- CustTest1 -- 1 -- Crisp
SupTest1 -- CustTest1 -- 1 -- Chocolate
(FOOTER) ORDER TOTAL
SupTest1 -- CustTest1 -- 2 -- Bread
SupTest1 -- CustTest1 -- 2 -- Crisp
(FOOTER) ORDER TOTAL
(FOOTER) CUST TOTAL

SupTest1 -- CustTest2 -- 3 -- Chocolate


On order 2 i want the total for the cust on the same page but because i force new page on order footer the cust total comes on new page. I can i have the last record of cust total on the same page

Thank you
 
Last edited:

vbaInet

AWF VIP
Local time
Today, 06:03
Joined
Jan 22, 2010
Messages
26,374
What is the setting of the Force New Page property? Do you have any other grouping in place?

I don't think the problem is the Force New Page property. There probably just isn't enough space to fit the total.

Do you have the Keep Together property on?
 

Users who are viewing this thread

Top Bottom