Crystal report scroll like header - crystal-reports

I am trying to create crystal report that has dynamical scroll like header section.
i want a header section that depending on its size may go on second page just like detail section does. the twist is that header consists from multiple small header sections that are not static :/ sometimes one of those might be suppressed and other times not.
for example:
we have H1 H2 H3 H4 H5 D1 F1
i do not want header 1 to be repeated on every page which i can easily suppress
but what can i do for header section 2 ?
I do not know will it be printed on second page or on first ? it may be also printed on third, depending on the length of first header section.
so what i want to know is:
1) how can i dynamically grow header section on next page
2) restrict section from repeating after first print
if anyone knows how to do this please help
thank you in advance

Related

Fix Page Header Height in Crystal reports

Is it possible to fix the height of page header or any other solutions?
My problem is I need to do this list of persons in page header
Boy Janna
Girl Leo
Ana Erick
Mina Carlo
Lea Shena
But it must be like this
(for page 1)
Boy Janna
Girl Leo
Ana Erick
(next page)
Mina Carlo
Lea Shena
If number of person is 6 or lower it will only appear in first page (if two page report the second page must have blank person). If the number of person is more than 6 the number 7 person and up will appear to next pages and so on.
The maximum row is 3 per page
This Sub report is in Page header in main report
I put this code in supress of Sub Report for Persons. If I don't tick the Can Grow and adjust the text box (it only shows 6 names) and other names are now missing and not appearing in the next page. If I tick can grow and remove the below supression code what happens is it shows repeated name each page.
if PageNumber = 1 then
false
else if PageNumber = TotalPageCount then
true
else
true
Thanks in advance
yes you can do it in group header or footer and the process you followed won't give you correct results. Follow below process.
In grouper header or footer take a sub report and place only those fields in the sub report that you want to display.
In sub report place the field in detail section and then go to
Right click Details --> section expert --> paging --> tick the check box visible records
In the space provided input number of records you want to view per page and no go to preview.
You can see those many records per page in group.
This is working solution I tried group header and group footer of a group.
Let me know if you face any issue.

ActiveReports 3 - Underlay Next property gets section partially printed

I have a report that has two headers. On the top one I have a subreport on the right side, that shows the report's main data. On the header below, I have two subreports. The one on the left has tabular information while the one on the right has more form-type info. This last subreport is set to match the upper header report width and position on the page.
Now, the top header is set as UnderlayNext = true, so it gets printed side by side with the tabular report. All is well except when the footer section of the subreport on the left does not fit on the page it is supposed to be printed and is moved to the next page. When that happens, the upper header section only gets partially printed, with the same height as the footer section of the other report.
EDIT: Rethinking (but not retesting) I think that what's going on is that the section set to underlay next does not go beyond the next section, thus when the section is not large enough, it gets cropped. In my case, the second section is larger than the UnderlayNext (top) one, but as I have a new page and the top section is set to repeat on every page, it gets cropped too. Funny thing is that if I select the data on the generated PDF, the information IS there, just not visible.
It would be suggested to set the KeepTogether property to "True" and the GroupKeepTogether property to "All" of the GroupHeader.
Regards,
Mohita
What I finally did was to add an empty group footer section with size zero at the bottom of the report and set PrintAtBottom to true.

Crystal Reports - Hide Page Header on First Page

I have a report that needs to show a report header on page 1, and a different header on subsequent pages.
This seems simple enough; if I add pagenumber=1 and goupnumber=1 to the suppress formula for the second header, it will only be shown after the first page. However, the report is also supposed to reset the page count several times in a single group, thus leaving several pages that match those criteria.
Is there another field in Crystal reports that could have a unique value for the first page? Or is there another way I might go about solving this?
You have to specify in the Selection Expert - Suppress Formula the following formula:
PageNumber = 1
In the Supress Formula try this Formula
Drilldowngrouplevel = 1 ;
or
PageNumber=TotalPageCount
You have to specify in the Selection Expert - second header - Suppress Formula the following formula:
PageNumber <> 1

SSRS - Semi-Blank page when Tablix exceeds page1 space

My Title to this question is probably a little confusing, but let me try explain what happens.
Our company report template requires a header and a footer. The footer is displayed on every page, but the header should only be displayed on page 1.
To achieve this, we removed the header content from the report header and placed it at the top of the report above the Tablix. This produced the desired results, but we now have the issue where we get semi-blank pages.
Some background:
- The header of page 1 takes up about 5cm of the page.
- There are no overlapping controls on the page.
- InteractiveSize property: 21cm, 29.7cm
- Margins property: 1cm, 1cm, 0cm, 0.5cm
- PageSize property: 21cm, 29.7cm
Now lets say on page 1, there is X amount of space for the tablix data (Because of the header), but from page 2 to the end there is Y amount of space for tablix data.
The problem we get is when the total amount of data that should be rendered is between X and Y. The report then renders the 1st page with the header, but apart from that and the footer, the page is blank. Then on page 2, the Tablix will display the data.
If the amount of data is less than X or more than Y, then we have no problems; the report renders as expected.
Can anyone maybe point me in the right direction please?
Thanks
It sounds like the tablix's KeepTogether property is set to True so that when there isn't enough room on the first page but there is on the second page for the entire tablix, it then renders on the second page.
Set it False

Border in Detail band

I have a question about how border should display in detail band, and I would like to get some help.
Say, a column in detail band that might have LOTS data, by lots, I meant sometimes a single record might actually took 2~3 page to display.
Now customer ask that we should make report always display bottom line of the border as long as it meets end of page (even this record its not end yet)
What I tried:
Make a column footer with 1px height line.
Set "Floating column footer" to TRUE.
Result : It works great, but this line will make extra empty space at end of the table if there is a Summary band after the column footer. I think I am close, but I just can't get rid of the strange empty space
Make a Frame with border, set "Print when detail overflow" to TRUE then put everything in detail band into this frame.
Result : Not work as I expected :(
Since this report contains not just a table in detail band, and the height of the table are random. Tricks like a border in Background or Page Footer are not suitable here
What else can I do ?
There is a PrintWhenExpression trick that can help with the page footer:
How to hide Page X / Y when report is 1 page ? - JasperForge Forum
The trick is to put a flag in the Report Parameter Map, then use the flag to decide whether text (or fields, lines, etc.) should be printed.
To use a line in Page Footer there will always be some pages with extra line. In this case, the report is always starting from page 1, and the table in the report always end before printing the Summary band. That means, the line is no longer necessary as long as Summary band has been reached. Thus:
Add a line in Page Footer with PrintWhenExpression :
new Boolean(!(Boolean.TRUE).equals($P{REPORT_PARAMETERS_MAP}.get("stopFlag")))
Then make a dummy textField in Summary band with PrintWhenExpression like this :
$P{REPORT_PARAMETERS_MAP}.put("stopFlag",Boolean.TRUE)
This trick works, but might need some tweaking for different layouts.
The option given by Dave is right.
If you care about the space still being used, then set the band and textfield heights to zero.
In my case using Dave's option worked (and I needed no extra space to be used).
I put this as PrintWhenExpression in the fields I just wanted to show in the last page:
$P{REPORT_PARAMETERS_MAP}.get("lastPage")!=null
And this as PrintWhenExpression in a 0-height textfield in the 0-heigth summary band:
$P{REPORT_PARAMETERS_MAP}.put("lastPage",":)")
When it comes to page termination the options are limited. Its made even hard because if you have items that do not display when null it still assumes that space is used.
I would stick with messing around with the column footer or page footer as your best options.