How to make every pages in Group tree has the same page number in Crystal report - crystal-reports

I'm really struggling with this. I really need help.
So, the problem is I have 6 items in Group tree as you can see here.
Pic 1
Every items use main report which has 4 subreports in it like this
Pic 2
the result i want is every subreport in each items of group tree will have the same page number and total page number is 6
Ex.
First Item - Page 1/6 , Page 1/6 , Page 1/6, Page 1/6
Second Item - Page 2/6 , Page 2/6 , Page 2/6, Page 2/6
and so on.
but now it's just show me total page is 24 and page number is just going from 1 to 24 as usual.

Try passing the total page count from the main report to the subreport via a shared variable.
You should also be able to suppress the extra pagenofms in the main report when pagenumber > totalpagecount

Related

Remove duplicate rows value from jasper ireport

I have added page wise total value in ireport for example , if my report has 1 page than it will show page 1 total if my report has 2 page than it will show page 1 total and page 2 total and in last it will display grand total.
the problem is when i report have 15 rows than its header goes on 2nd page but total displays in one page, but if header doesn't go on second page it shows perfect.
please help me how to remove page 1 total if page 1 total and grand total is same.
enter image description here
i want that if page 1 data print only once if there is not any rows in page 2

Crystal Report Sub Report paging/positioning

I am creating a report that has 2 sub-reports,
First Subreport - top to middle main report, 12 rows max, and rows after 12 will be on next page. I used the "Next Page After" with Formula: (Remainder(GroupNumber, 12) = 0 And Not ONLASTRECORD).
The Second Subreport will have same requirement, 12 rows max and rows after 12 will be no next page.
My problem I cannot make the second Subreport display at middle of page on 2nd page.
If I put the 2 Subreports in same section the the data of both subreports is displayed at top of page (overlapping).
If I put the 2 subreports in different Sections (Report Footer a and b). The Second Subreport is starting after last page the First SubReport.
Report Design:
enter image description here
Thanks.
Best Regards,
Dennis
Right-click the 2nd subreport object,
select the menu option of 'Format Subreport...' and,
under the 'Common' tab, turn of the option of 'Keep Object Together'.

Crystal Reports: 4 pages, 1 report, 4 different headers

I am having troubles creating CR report with multiple pages.
What I am trying to achieve is:
Page 1: report
Page 2: same report with different header
Page 3: still same report as page 1 with different header
Page 4: same analogy
Now my reports is designed for 1 page.
Any tips? I'm little frustrated ATM...
You're going to need 4 Page Header sections. Each section will use a formula to be suppressed based upon the page number of the report. Each Page Header will be configured in the unique design needed for each of your 4 pages.
If you only have 1 row of data in your database that needs to generate all 4 reports, then you will also need 4 Details sections that use the same formula to be suppressed by page numbers. The design of the details sections will all be identical.
At some point you will also want to set the "New Page After" check box on a section. This can be done on each of the 4 details sections, or in the Page Footer sections if you use them. If you use Page Footer sections, they will likely need to use the suppression formula by page number as well.
This setup will yield 4 pages of the same data on each page, with unique page headers.
The complexity of your suppression formula will vary depending upon how much data you plan to print with each run of the report. If it will only be 1 report with a total of 4 pages then the formula will be rather simple since you only need to check for 4 possible values of PageNumber. If you plan to print multiple reports in this manner per run, then you need to check for PageNumber values that are multiples of 4 + n, where n is either 1, 2, 3, or 4. This still isn't an incredibly complex formula, providing you are 100% certain that none of the 4 pages needed for each row of data will ever exceed a single page. If that happens, the complexity of the report becomes much greater.

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 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.