Page Number on crystal reports - crystal-reports

I want to display the page number on my crystal report only if the number of pages is more than 1. How can I do this?

Drag and drop the special field page number on to report and write a supress condition
If total page count > 1
Then false
Else true
Here total page count is again a special field

Related

Repeating row on each page

I have a crystal report consisting of 9 pages (1-9).
I have only one field(String) where I show a record from the database(say amount). The issue is that amount is being displayed on every page. I want that one record (amount) to be shown only on the first page.
I tried several things with formula editing like "Suppress if duplicate" etc.
Here you have 2 screenshots.
Page 1/9 of the report
Page 2/9 of the report
Note: Remittance information is a group header
Depending on the structure of your report one of the following formulas should do the trick.
Put inside the suppressing formula of the amount-field:
Number 1
//suppressing the field on all records except the first record
If OnFirstRecord Then False Else True
Number 2
//suppressing the field on all pages except page 1
If PageNumber=1 Then False Else True
Number 3
//suppressing the field on all groups except #1
If GroupNumber=1 Then False Else True

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.

Running Total of a Running Total

I have a report where each Group has many records. In these records I have a Running Total that returns True if the fields text matches a certain criteria using the Max type - so one or more matches = True. This is located at the bottom of each group. I now need to count how many groups have a True - so it's like a Running Total of a Running Total - which is not allowed so how do I wire this up? Other ideas for getting this count would be entertained. Thanks for your help...
Layout:
Record(Group Header)
True(function)
True(function)
False(function)
{1}(Group Footer)
Record(Group Header)
False(function)
False(function)
{0}(Group Footer)
{total}(Page Footer)
Ok, here is one way of doing this. It may seem counterintuitive, but it works. Create a formula "max". The content of that formula is:
if {criteria} = true then 1
else 0
Put that formula in your Detail Section. It will give you a 1 if your criteria equals true and a 0 if the criteria is false. Now right-click on the #max formula in the detail section and click Insert -> Summary. Create a sum and put it in the Group Footer. Now create a second formula "SumMax". The content of that formula is:
if {#max} > 0 then 1
else 0
Put that formula also in your Group Footer. Now right-click on "#SumMax" and do Insert -> Summary and choose Sum. Put that in the Report Footer. Suppress #max and/or #SumMax as you please.
The way it works is that it counts all the true's of your criteria in a group (#max). If the result is greater than 0, #SumMax will count 1. Then you summarize the count of #SumMax, which gives you the total.

Crystal Report - Hide specific pages

I have develped a crystal report. It must have 4 pages as default and additional 2 depending on the condition.
When the condition is success its showing all the text objects in 5th and 6th pages correctly, but in else condition, its displaying 4 pages with appropriate data and empty pages having page header in last 2 pages.
How to suppress/completely hide last 2 pages?
Pls advice
Thanks
Your best bet would be to create a report with multiple report footer sections. You can then either adjust each report footer section to be 1 page high and add the relevant conditions and objects or alternatively add a subreport to each report footer section containing the fields/logic.
I would probably create 8 report footer sections (2 being blank) then decide whether to show the 2 blank ones or the 2 with relevant objects.
In section expert, next to suppress use the below formula
if pagenumber in [99,100] then true
else false
Note; Assuming 99 and 100 are last 2 pages of the report.

How to display the correct total number of pages count excluding the blank page numbers in Crystal Reports

How we can get correct ‘Page N of M’ and not just raw page count.
Total Page Count property of Crystal Report will need to render all pages of
the report in order to show the count but we need to exclude the blank pages from this
Page N of M is correct.
You need to figure out why you have blank pages.
Alternatively look into the Section formatting to suppress blank pages. There is a setting for that.
Right click over on the left Section names and choose Format or Format Section.