Crystal Reports - Hide Page Header on First Page - crystal-reports

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

Related

Crystal Reports 2013: Formula field will not display on page

I have a formula called PickOutstanding. Here is the code:
if OnLastRecord and {#Calc} < 0 THEN
toText({#shipctns}-{#RTotal0}) & " Outstanding"
which works on the report but does not show. For example:
In the first image is my report, with where #PickOutstanding is highlighted
#PickOutstanding does not show. However when I click into it:
It clearly is showing right there. What could be causing it to be hidden on the report itself and how do I get it to show?
Full images in case it is difficult to see the difference between pictures
Pic1:
And Pic2:
It was an oversight on my part. OnLastRecord was only working on the very last record in the report. Did not work multi group. Will look into getting it to work per group.

Crystal Reports - columns line displayed on the last page even there are no records

I have used the following code in a formula in order to count the records:
Shared NumberVar PageofLastField;
If OnLastRecord then PageofLastField := PageNumber;
Also, for page header, I have used the following code in a formula in order to suppress report header if there are no records:
Shared NumberVar PageofLastField;
PageofLastField := PageofLastField;
IF pageofLastfield <> 0 and PageNumber > PageofLastField
THEN TRUE
ELSE FALSE
But still, on the last page, the lines between columns are displayed like a dot (please see printscreen). Can anyone help me? Thanks
Make sure this is not the case with your report.
this happens when you have drawn a line in header section but there is a small portion coming out to the next section. just drag the end point to the same section where the line was started in. This should solve it.

Force Page Break before Row based off formula?

I am new to crystal reports. I have built a simple report that is populated by values from a stored procedure. I'm trying to place a page break before the row if the value of one of the returned items from the stored procedure is equal to a specific string. Is this possible? Thanks in advance.
Depending on your version of Crystal Reports, in the Section Expert under the Paging tab you should have the option to specify page breaks using a formula.
Hope that helps,
Chris
Yes this is possible. Right click on the section like Report Detail, Report footer etc and there will be an option to insert page break.
Against that option there will be a symbol of formula.
In the formula, specify the formula:
if(Report field...)="comparable string"
then true
else false
And you are done. You can ask again if this is not clear.
you can break a page using section expert.
Steps for produce:-
Right Click on Detail Section->Click on Section Expert->Click On Paging Tab->select CheckBox(New page Before) ->Click on Formula Button.
here will open a popup window and put below code in formula window.
if{YOUR_REPORT_FIELD_NAME}="xyz" then
True
else
False
when your field value find "xyz" then page will be break.
if want any clarification , please comment.

Crystal Reports: Suppression is hiding records on the next page

I have a Crystal Report where I want to display only the first ItemNum row.
I used the following expression (?) to suppress subsequent records.
Previous ({ItemHistory.ItemNum}) = ({ItemHistory.ItemNum})
My problem is that when I use a parameter selecting only one ItemNum, the same ItemNum on the second page which I want to appear (because it belongs to a different storeroom) will also be suppressed.
I figured it out. I just added check to make sure supression of the ItemNum on the next page (new storeroom) is not performed.
Previous ({ItemHistory.ItemNum}) =
{ItemHistory.ItemNum}
and
Previous({ITEMHISTORY.STOREROOM}) =
{ITEMHISTORY.STOREROOM}

Suppressing subreport with no data and a header

I have a fairly simple subreport that I want to suppress when there are no records selected for it. The problem is that I have a header and footer section of this subreport with static elements in it (text boxes, lines, etc.). I have set the section containing the subreport, the subreport itself and the sections within the subreport to all be surpressed when there are no records. Yet, the subreport shows up anyway. The data section with no data is indeed suppressed but the headers and footers seem to keep the subreport visible.
Any ideas? Oh, I'm running Crystal-Reports 2011. Thanks!
I just ran into this myself in CR2008. Here are the steps I did to make this work:
Go into your subreport (by that I mean have it open in its own designer window) -> go into 'Report Options' under the 'File' menu -> select 'Suppress printing if no records'
Now go back into your main report. Right-click on the subreport -> go to 'Format Subreport' -> hit the 'Subreport' tab -> check the 'Suppress Blank Subreport' checkbox.
If the subreport is the only thing in the main report section, go into that section in the 'Section Editor' by right-clicking on it -> check the 'Suppress Blank Section' checkbox.
EDIT: If your subreport does return records but it is just that none are displayed then try using shared variables. To do this you need to consider the logic you're using to display the records in the subreport in the first place. This is likely whatever logic found in the detail section suppression formula, but it will depend heavily on the format of your particular subreport.
Now, initialize a shared numbervar in your subreport's report header and then increment it each time a row is displayed using the aforementioned logic.
Back in your main report, you may be able to check the value of that variable to conditionally suppress the subreport's section. I say "may" because CR may not evaluate the subreport's variables prior to looking at the suppression formula, but give it a whirl. You'll want to use the whileprintingrecords; keyword in your section suppression formula to delay its evaluation. Good luck!
Have you tried using suppress formula?
Right click Format Field > Check Suppress > click Edit formula [x-2] button
Hard to follow everything in the post but if data is running into each other, then add a section and place your sub report in the section and make sure can grow is checked off.
If you have static data that you want to show, then you may want to create 2 sub reports, one with the static data and one with the dynamic data and suppress if blank.
Put subReport in a Section, then Right click on Section=> Section Expert
Then check true 'Supress Blank Section' in the common tab as mentioned in below picture.