views:

204

answers:

1

I have a single crystal report that usually ends up about 150 pages long. The single .rpt, through the use of clever grouping, actually includes records with little individual header and footer sections for each customer. Think of it as a sales report for 100 customers, each with their own section.

Each customer section is 2 to 7 pages in length.

We would like to print on the front and back of pages. However, my concern is that approximately half of the customer sections would begin printing on the back side of the last page of the previous customer section.

Edit: What this boils down to... I need to insert an extra page break if the current page number is odd. Any ideas?

+3  A: 

well if all your asking for is a formula to insert a page break when page number is odd then add this to the New Page After or New Page Before formula on the desired Section of the report.

PageNumber Mod 2 = 1

Sorry I cant be of more help but Im having trouble understanding your question.


EDITED:

Thanks for the clarification basically in your grouping for your customer (ie "little individual footer section"), you will need to do something like this in the New Page After formula

(Next({Customer.CustomerId}) <> {Customer.CustomerId})
AND 
(PageNumber MOD 2 = 1)

Note Customer.CustomerID should reference a unique value for your customer in your recordset. I just made something up since I dont know your data field names. Basically the forumla above will look at the Next Unique Customer and if it is not the same value as the current customer, then you know that a new Customer section is starting. Combine that logic with weather or not the PageNumber is odd and you can tell weather or not you need to insert a page break.


EDITED 2

(ISNULL(Next({Customer.CustomerId})) OR Next({Customer.CustomerId}) = "")
AND
(Next({Customer.CustomerId}) <> {Customer.CustomerId})
AND 
(PageNumber MOD 2 = 1)

You may want to check if Next Customer ID (IE Unique Customer Value) is null this way you dont end up with a blank page at the very end of the report.

John Hartsock
Edited for clarification
hamlin11
Edited my answer...check it out
John Hartsock
sorry edited my answer again.. I was reading it and was accidentally using != instead of <>....Sorry sometimes I mix and match syntax from different languages. Im sure its a common mistake.
John Hartsock