开发者

Crystal Reports New Page if More than 1 Page

开发者 https://www.devze.com 2023-03-03 20:36 出处:网络
I\'ve been searching everywhere for an answer to this but no luck.I\'ve only got limited abilities in Crystal Reports. Using CR 2008.

I've been searching everywhere for an answer to this but no luck. I've only got limited abilities in Crystal Reports. Using CR 2008.

I've got an invoice that is split into Services and Expenses. Expenses are detailed in a sub-report.

What I want to do is force a new page at a section before the Expenses sub report if the whole invoice is more than 1 page.

I'm currently doing this b开发者_如何学Pythony a setting "New Page After" in section expert if Services are Not $0 and Expense are not $0. along the lines of New Page After: {Table.Services} <>0 and {Table.Expense}<>0

Problem is if there is only a couple of entries for services and a couple for Expenses, this may fit on one page, but since both are not $0 it will still force a new page. I can't really do it by forcing new page if there are more than 3 service entries, as 1 service entry could in theory take up the same space as 5 small service entries.

I've tried the following workaround, but still no luck.

Created a Page count formula that will only show the total page, so if it's 2 pages, then the number 2 will show.

NumberVar startNum := 0; ToText((TotalPageCount + startNum), 0)

I then tried to conditionally force a new page using section expert with the following:

{@PageCount}>'1'

End result is that the page will break at the section even if all info will fit on 1 page.

Hope above makes sense and hoping someone may be able to help!

Thanks

Collin


Similar scenario here. You can group your data by "Services Name"

Then edit the formula as

GroupName ({spReport_YourReport;1.Services Name})=''

Crystal Reports New Page if More than 1 Page

0

精彩评论

暂无评论...
验证码 换一张
取 消