How to suppress a blank page at the end of a Crystal Report group - crystal-reports

I have a rather complex Crystal Report that is displaying a blank page at the end of each group. This is an issue as my customer requires the next group to start on the next page without a blank page in between.
The report has four groups; the blank page appears at the end of each Group 1. Group 1 has four sub-group headers that dynamically display on a page given an employee's group. There is one group footer for Group 1.
I do know it is not an issue of the details page bleeding into the next page and falsely creating a blank page; this is consistent with each Group 1.
Solutions I have tried:
I have de-selected the option to display a "New Page After" in both the Section Expert and the Group Expert, just for Group 1 (as this is the group causing the issue).
Also added a formula to the Group 1 footer to the "New Page After" formula to display Not(OnLastRecord); the blank page remains
Tried selecting and de-selecting the "Keep Together" options, in both the Section Expert and Group Expert
Some of these solutions switch the blank page to the start of Group 1. I have dynamic paging for each employee, and can see that page 1 of 4 for the first employee in each group is blank.
I am at a total loss here; all of my normal strategies for grouping logic have not worked. Also attempted each of these suggested with no luck:
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16733
Crystal Reports 11 - Useless blank page is added with just group headers that have data
https://answers.sap.com/questions/4160531/a-blank-page-appears-after-the-group-header.html

Posting the answer for those building complex Crystal reports and troubleshooting this issue: the "Keep Together" option was selected for Group 2, which was adding in the extra page for the first person in each Group 1.

Related

Crystal Report: skip page if detail section is null

I have a subreport to filter the processing of specific products within a selected week set by the user. The subreport has 5 groups section and a detail section.
Specifically, the groups filter the data like this:
Group1: filters the starting date of the process
Group2: filters the products' group
Group3: filters the products' code
Group4: filters the products' number
Group5: filters the products' sub-number
I use group1 section for writing some simple text. In the detail section, I put some fields. Now when I have no record in the detail section, the sub-report prints the text of group1. For example, because in the day of the print there isn't any processing work.
How can I skip the page if the detail section has no records? (Or perhaps it is necessary to suppress the group1?)
Try to right click on the section, go to section expert, and check suppress blank section. This should hide the section if there are no values for that particular day
You should try supressing the group 1 if the details section is null. I'm not sure that you can actually skip a page.
If you are wondering how to know if the details section is null, maybe using a shared variable inside that section, which will count how many records will be inside the details section, to be used in the supression formula for the group 1.

Crystal Reports: how to repeat Details A section on every page

I'm creating a report in Crystal. It's a pretty basic report: I have two groups based on the same date field: year and month.
Those two groups serve as a way of organizing my details. I have the details hidden so they can be drilled down upon.
So when you first view the report, you just see the year(s) for group 1, and then the months for group 2.
If I wasn't using the grouped dates in this way, and was just creating a basic table, I would put the field headers in the page header section, which would automatically put the field headers on every page. However, since I have the grouped dates (hiding the details) on my first page, I can't put the field headers in there.
As a result, I created two detail sections (A and B). I put my field headers in A with the suppress formula (not onfirstrecord). This serves my purpose, but for when the report details fill up multiple pages, my Details A sections will only display on the first page.
Is there some formula or other way for me to:
1) Keep my field headers in Details A, but repeat the field headers on each new page?
2) or, move my field headers to the Page Header section, but somehow suppress it when my groups are being displayed on my main page (where the year and month groups can be drilled down on)?
Thank you!
You may want to use a repeated group header.
To do this open the Change Group Options dialog (right click on a group header, then choose Change Group). On the Options tab check Repeat Group Header On Each Page.
Put your headers for your detail section in a group header (maybe an additional one just for this purpose). Repeat this header on each page.
You can even detect if the header is printed the first time or if it is repeated using InRepeatedGroupHeader. This way you can implement a 'continued' on a repeated group header.

Crystal Report Show Total Only On Last Page

I have a formula that calculated price total of an invoice eg. #vtotal. The invoice page could span from 1 to n page. I would like to show the total only on last page. How do I do that?
I have searched and tried on some suggestions using report footer, but it does not work as it implies, the report footer always show in tandem with page footer.
I have also tried using formula:
if PageNumber = TotalPageCount then
{#vtotal}
It still display 0 on pages with PageNumber < TotalPage Count.
How to do it correctly to only show on last page? And nothing on other.
Create group over invoice ID (or whatever field identifies invoice uniquely) and show your formula in group footer.
/edit after comments/
Alternative way is to supress some formulas in page footer section. Place your {#vtotal} into page footer (like it was initially) and create suppress formula for it, with content like
{PageNumber < TotalPageCount}
You need to somehow account for situations, when you print more than single invoice - if this is possible for your setup of course.
You Can write Grand Total in Report Footer. So it will display in only last page.

Crystal Reports 8.5 duplex printing

I have Cristal Reports 8.5 I need to reset page number for every new group, and if group contains odd number of pages need to add blank page, if there is even number of pages nothing should be done just reset page numbers.
I found many issues about this but nothing works as it should.
There is Group Header 1 anf Group Footer 1, and report need to be printed on duplex printer.
Thanks
Here is what I did to make this work on a simple report with just one group:
First I created a new Group Footer section, Group Footer 1b
Group Header 1: on the Common tab only "Keep Together" is checked. On the Paging tab, in the formula field for "New Page Before", enter not OnFirstRecord
Detail Section: only check "Keep Together" on the Common tab
Group Footer 1: nothing is checked on either Common or Paging tab
Group Footer 1a: "Keep together" on Common tab, on Paging tab put Remainder(PageNumber,2) =1 in the formula field under "New Page After"
Group Footer 1b: Check "keep Together" on Common tab, put Remainder(PageNumber,2) = 1 in the formula field under Suppress.
This worked for me and will add a blank page if the group ends on an odd page.

Making report footer to appear just below the last page records

I am using Crystal Reports with VS-2005.
I have a report with a report footer section comprising of sum totals of a column. The problem is that in some cases, the records consume the entire page and the report footer alone appears on the next page. It looks awkward. I want the report footer to appear just below the last record row ended.
Is there any trick to make the report footer section fit on the last page itself?
If you aren't using grouping, try this:
Add an additional section below your last detail section.
In Section Expert, mark the detail section Keep Together.
For the suppress formula for the new section, specify Not OnLastRecord.
Move the content from the report footer to the new detail section.
If you are using grouping, do this in the last group footer instead, and in Group Expert, mark the group Keep Group Together.