I need to display multiple subreports on first page then continue printing on next page
I have 2 subreports that I displayed in separate detail sections in my crystal report.
I want both to be displayed in the first page and continued on the next pages.
For example:
Subreport 1 have 8 records
Subreport 2 have 15 records
In page 1
Subreport 1 will display first 5 records
Subreport 2 will display first 5 records
In page 2
Subreport 1 will display records 6-8
Subreport 2 will display records 6-10
In page 3
Subreport 1 will be empty since all records have been printed already
Subreport 2 will display records 10-15
Related
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
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'.
I'm using iReport 5.2.0 and I have 2 reports that I want to print.
Both reports contain dynamic data and can be of multiple pages. However, number of pages of first report is always equal to number of pages in second report.
In my current setup, the first report is always printed completely and then all the pages of the second report are printed.
However, my requirement is that the report should print in the following sequence:
Page 1 of Report 1.
Page 1 of Report 2.
Page 2 of Report 1.
Page 2 of Report 2.
Page 3 of Report 1.
Page 3 of Report 2.
...
Is there any way I could achieve this with JasperReports?
Lets say , report 1 uses X query with X_SQL and report 2 uses Y query with Y_SQL.
If both of the query has same number of column then it is great otherwise add additional column with respect to X_SQL and Y_SQL in order to union both query.
Remember you have to generate one number series column and one dummy column in your sql. You can generate number series dynamically in your sql.
X_SQL with two new column (number_series,'detail1'as dummy)
union
Y_SQL with two new column (number_series,'detail2'as dummy)
order by number_series, dummy
OUTPUT of SQL:
X_SQL column , 1 as number_series, 'detail1' as dummy
Y_SQL column , 1 as number_series, 'detail2' as dummy
X_SQL column , 2 as number_series, 'detail1' as dummy
Y_SQL column , 2 as number_series, 'detail2' as dummy
Now add two detail band in your new report. Height of report is only one detail band height + top and bottom padding.
1 detail band = first report design
2 detail band = second report design
U can use subreport if your jrxml is too complex.
Now in print when expression of detail band use
detail band 1 : $F{dummy}.equals('detail1')
detail band 2 : $F{dummy}.equals('detail2')
Note:
1) you need to order by in your sql query.
2) height of report need to choose properly.
If still you are having issue then i suggest to post your jrxml.
I have a report with 2 suppliers. I want to show items ordered by the 2 suppliers. For that I am using a subreport.
For the 1st supplier there are 15 rows and second has 1.
But there are 2 many pages displayed. i.e. 92 pages. The values are repeated. Also a lot of empty pages are shown.
Please advise.
https://www.dropbox.com/s/i5n3z80m7c2itlt/Complex1.jrxml
https://www.dropbox.com/s/5qm5o9cz1yatfad/subcomplex.jrxml
Mithnil,
In the complex1.jrxml query, how many rows are returned? You put the subreport in the detail band, and without any report groups it will execute whatever is in the detail band for each row of the report query. Maybe you need to work on the query to only include one row per vendor.
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.