Suppress section if details empty on page X - Crystal Reports - crystal-reports

I've been working with Crystal Reports 2008 for a while now, and while I get the general gist of it, some things seem quite hard to do, especially because I don't know what tags and proper syntax is allowed within CR.
Anyway, my problem is as follows: I've been making an invoice layout, but sometimes the Details-section ends at a page, but the section containing the invoice summary (including the final price and such) is printed on the page after that. That also means the Details header is printed the next page, with nothing between the header and the summary.
Is it possible to conditionally suppress Page Header D when the Details section is null on the last page?
Trying something along the lines of
IF {Section Details} = "" AND pagenumber=TotalPageCount
THEN TRUE
ELSE FALSE
I'm sorry if I'm making no sense; there is a drastic lack of coffee around here.

Try just using the keyword OnLastRecord for your Page Header suppression formula. The only situation I'm not 100% sure about is when your last page only contains a single record (the last record)... it might still suppress the header in that situation, but I think it's probably OK.

Right click on the report page header you want to conditionally suppress.
Section Expert -> page Header -> Check the checkbox for Suppress and click on the formula button on right side against suppress in same section expert screen and in the formula..just write Onlastrecord AND NOT Onfirstrecord
Done !! This way, even if one record is there, the page header will show else it will get suppressed if no more rows are present on next page in the corresponding details section. you can have report footer or any summary following the details without any ugly page header and lines showing.
Apply the same Suppress formula to Report Footer Section also if you don't want report footer on the last page.
Thanks to Abhilash in this SAP Forum

Related

Display report header in every page of cross tab in Crystal report

I want to display report header in every page of my cross tab report in Crystal Reports 13. Currently the header only appears on the first page. How can I fix this problem? Kindly suggest me.
Check bellow screen shot
Page 1:
Page 2:
Design View:
Right click on the selected fields in report header and go to format and check option Repeat on Horizontal Pages so that it applies for every page
Finally I solved the problem to display header for cross tab report in each page.
1.Create a formula using bellow code
WhileReadingRecords;
""
2.Create a Group Field using that formula field (which is empty group)
3.Crete Cross Tab Report inside of group header section.
4.Finally place my report header inside of page header section.
Now its working according to my demand and display report header every page
Thanks all of you
Check bellow screen shot
You have to do following things:
right-clicking on the row header
select Row options
select Repeat Labels on Page break
Crystal Reports lets you designate report objects that don't expand horizontally, such as text objects, field objects, OLE objects, charts, maps, lines, boxes, and so on, to be repeated on each additional horizontal page that a Cross-Tab creates.
Check this for help.
Also, similar question How to repeat Crystal Report Header on each page answered by me here. If you still after this links don't get solution, feel free to ask so we go into details of your cross-tab etc...
There are two kinds of headers in Crystal Reports. There are Report Headers (which you're currently using) and there are Page Headers (which are what you want to use in this case.)
A Report Header will only display once - on the first page.
A Page Header will appear on every page. (Unless you
specifically tell it not to.)
Move the circled fields into a Page Header and suppress the old Report Header you were using before. If all goes well, you'll see the circled field on every page going forward.
One other possible approach would be to insert a separate section above each crosstab that will contain your repeating Page Header. (Section Expert -> Insert) or (Right click Section -> Insert Section Below)
Then for the aforementioned inserted section, force a page break before. (Section Expert -> New Page Before)
Repeat this step for each Report Header section that contains a crosstab. The downside is that you will have many pages depending on the number of crosstabs in your report. Hope it helps.

How to print only the first page in Crystal Report?

I have a crystal report and would like to print only the first page regardless of the number of pages. That is if the report have five pages, i want only the first page to be returned.
I thought i could achieved that by section expert, however, my report have few sub reports. Please how to i return only one page regardless of the report size. Any help would be appreciated.
Choose Section Expert
For very section set a Suppress formula
[click X-2 button in Suppress (no drill-down) line]
type this frmula PageNumber >1
that means suppress this section if page number is greater than one.
That's all.
I know this late but it may be useful for someone in future by using Emanuele Greco above answer it is showing last page as blank to avoid last page as blank
Right Click on the Report Footer and choose Hide.It works for me

How to hide page header in crystal report

I have created a crystal report to show the English Exam marks for students and walk-ins for my project. The information is shown in two sub reports(1 for students and other for walk-ins). There is no information to show on the page header or the report footer while on page footer i display the page number, print date and print time. Now I wanted to hide/suppress the page header(since it contains no information). I tried suppress blank sections and suppress(No-Drill Down). But both these does not do the desired. Now the Page Number 1 has no information and is blank. If we take a print out, it is a waste of 1st page. Please provide me some help.
Thanks
If page header has no information then instead of using supress blank section directly supress the page header by right click on page header
dear if your header have text then use the formula field for the header
go to the toolbar and in the formula field create new formula like
if(condition) then
your header text
else
""
also take look to the following link Book
and if you want to suppress you header the also make it suppress by formula
right click on the header section and click on section expert and in the popup window write formal for the suppress same as above
:D

Blank Page when "Print at Bottom of Page" is on and all sections on the blank page are suppressed

I'm using Crystal Reports Basic for Visual Studio 2008.
I have each item in a group printing on a separate page. There is a footer section which is set to Print at the Bottom of the Page. I am suppressing the page when its data is 0 by suppressing all sections with a formula.
The problem I have is that when the footer is set to bottom of the page, the suppressed page is printed as a blank page. When I turn off bottom of the page, and use NewPageBefore with the formula instead, the page is suppressed correctly, but when I turn on "bottom of the page", I get a blank page.
I have checked for unsuppressed sections, but they are all either suppressed with the checkbox or the formula.
I had this issue before, which took me quite a lot of time to find a workaround. Hopefully putting the answer here will save some time for others.
Whenever you enable "Print at Bottom of Page" for a section, make sure other sections that come after that (including Report Footer and Page Footer) are all suppressed, otherwise there will be an empty page printed at the end. Note that keeping them empty or ultimately narrow is not enough, they must be suppressed explicitly.
I had an empty report footer with a 0 height, and I thought it would take no space and will not cause an issue; but I was wrong. I had to explicitly suppress that footer to solve the issue.
If the sections coming after that are suppressed via a formula, make sure the formula is satisfied on the last record.
I am a complete novice here, but I had to build a report for work and figure out how to do this.
I had the same issue - but caused by two separate reasons. First, when I checked the 'page after' to keep each group on its own page, I had a blank page at the end. I simply added a formula 'Not OnLastRecord'.
Then, the second issue was the 'print footer at bottom of page' - I wanted each sub-group to start a new column at top of page. This also created a blank page at the end (if I turned off the 'print footer at bottom' the page disappeared). I followed Sina Irvanian's advide here and suppressed the footers that came after it. I only suppressed the ones that were blank since my page footer had content - this was sufficient.
Problem solved!
It sounds as though NewPageBefore is unconditionally checked on the footer section. If so, try unchecking it and checking NewPageAfter instead.
Alternatively, if a new page has to be begun before the footer section which is then printed at the bottom of the following page when the data is not 0, try unchecking the NewPageBefore option and instead enter the opposite of the conditional suppress formula in the conditional NewPageBefore formula - ie. data is not 0.

Adding a terms and conditions page to a Crystal Reports report

In Visual Studio 2005 Crystal Reports we have a simple report to the back side of this report. I need to add our terms and conditions page.
How to insert or add a second report?
Or
I need to mention our terms and conditions page on back side of main report.
How can I add this functionality?
If I understand correctly that you have one detail per page, which is displayed in the Page Header, and you have nothing in the Details section, you could do the following:
In the Detail section, insert a second Detail second so that you'll have Detail A and Detail B. Leave Detail A blank. Put the Terms & Conditions image into Detail B, go to Format Section for Detail B, and check New Page Before. The reasons for the two detail sections is sometimes CR doesn't respect New Page Before in a single Detail section.
Now, go to Format Section, and for the Page Header enter the following formula in the Suppress (No Drill-Down) formula editor:
PageNumber mod 2 = 0
You will now have one record printed in the page header, then a page with the watermark, then another page with a record in the page header, then a page with the watermark, etc.
You'll just need to make sure when printing to use full duplexing.