I am using a datatable to load the data for the crystal report. Based on the data filtered by the user in the DataGridview and clicking on Print will display the filtered data in Report.
All is fine.I have done this.When there is no data in the Details section I am suppressing it using the below formula in the suppress.
Shared NumberVar PageofLastField;
If OnLastRecord then PageofLastField = PageNumber;
In the header section when there is no data in Details section supress page header.Below is the formula used.
(Reference Crystal Reports - Suppress a Page Header if the page has 0 records)
Shared NumberVar PageofLastField;
PageofLastField := PageofLastField;
if pageofLastfield <> 0 and PageNumber > PageofLastField
THEN TRUE
ELSE FALSE
Below is the image of the crystal report.
When I click PRINT button in the front end. When there is no data in Details section the Page header is displayed.
Below image is the Second page of the report where there are no records and summary is displayed.
If in the header section if I use the below formula
OnLastRecord AND Count({PaymentReportTable.InvID}) <> 1
In the Second Page even if the records are displayed Pageheader is not displayed.I understand it becos the formula says it all.
I have created around 12 Crystal reports and I am facing the same problem in all of them.
Please advice.
I read your question. just inform me what happen when you not suppress.
I think your footer evaluate because of it has the value.
are you try OnLastRecord or {GROUP FIELD NAME} <> Next({GROUP FIELD NAME}) this condition as your reference link.
Related
1)I am using matrix to show my data as tax for each year. So in row I am showing tax name and for column I am grouping against year. I using rdlc to export it as pdf. on a page as per width it showing 6 column and as there is no space it split remaining columns on another page. Now my issue is, there are no much rows and there is space on same page below that tablix to occupy another tablix (splitted column's) still it is moving remaining columns on another page. I tried with keepTogether property but is it not working for me. I set it for tablix,column group also.
2) Now I want to use this above report as sub report so I add this report on another report file at the end of page. So while rendering the report as subreport it split exceed columns on another page which is also at the end of page keeping a lot of empty space at start of that second page. How can I avoid this.
Suppose I have Main report with some basic info at first then I put sub report at end of first page. Now sub report contains data in matrix which column increases dynamically. so after 4 column it split and goes on next page for next page and put remaining columns on next page at the END. Which I want at the start of next page.
basic info
sub report content in matrix
---------------------------------------------------------------------------
page break here from sub report as more columns are there.
( this space remain blank. I want to avoid this blank space.)
sub report remaining columns came here.
I want to display only the report header of crystal reports on first page. To hide the details section on first report, I added the formula in the suppressed section of my crystal report
If PageNumber=1 then
True
else
False
The problem is if I apply this formula no further pages are been added to crystal report, crystal report just show one page and that with report header and that's all.
Try your formula slightly different:
PageNumber < 2
If that doesn't work you can try Pratik's suggestion and check the "New Page After" in the Paging tab of the Section Expert.
To hide Details section you need to right click on Details section and perform following steps :
Go to Section Expert
Select your Section
Check the suppress checkbox on the right
Click the formula button(x+2) right next to the checkbox label and
formula editor will open
Now you need to right logic
if(PageNumber=1)
true
else
false
not sure it will work in your case I tried it for hiding section in other condition.
I have a crystal report ,into which I am pulling data from the database.
The data is pulled and displayed perfectly, but I want it to be displayed on two separate pages with different page headers.
Ex
name loginid delivery asp/net com
ud ud#gmail.com yes asp com
currently these fields are displayed on one page but i want it like as follows:
page 1
name loginod delivery
ud ud#gmail.com yes
page 2
asp/net com
asp com
Can any1 help?
Insert a second details section
Position fields as desired
Add this formula to details A conditional-suppression formula:
// suppress section when page number is even (e.g. 2,4,6,...)
Remainder(RecordNumber,2)=0
Add this formula to details B conditional-suppression formula:
// suppress section when page number is odd (e.g. 1,3,5,...)
Remainder(RecordNumber,2)<>0
I have created a data table with multiple data records. I want to print data of specific columns for each row to crystal report. For instance, the print-out should show 6 rows of data in 1st page and next 6 rows of data in 2nd page with specific format.
What I've done is printing each row of data in one page, which is wasting my papers.
Looking forward to any kind answers :)
Add your columns to Details section of Crystal Report.
Then right click on Details section, select Section Expert from pop-up menu. Select Paging tab. Check the box New Page After -> * visible records and change number from 1 to 6.
Hope it will help.
I use CrystalReport in Visual Studio 2005 and make a bill report ... this bill
I use the header - Details- and footer in this report ..
in details section I limit the record to 10 for every page
so if there is a bill contains 15 record ..
first 10 record in first page . and 5 in the second page when print
put the problems
1- the footer show in the second page only
2- in the second page the Fields in the footer Raised up beacuse the second page contains 5 records only
so if the record number in the report is not 10 so the footer fields raised up
so please any one help me to solve the problem
Notation : I limit the number of records for every page to 10 record only .. i need empty
records if the reports records < 10 \
Please any one help my
Thanks
Sorry I don't know 100% what your problem is (maybe post some screenshots) but there might be two possible problems/solutions:
in CR Reports you've got document and page footer - if you use the document footer (don't remember the exact name) you will see this only once - just like a document header
if the details parts get's to big the footers are AFAIK the first thing that get's striped so try to compress your details (or any other section) to get more area for the footer (or display only 9 items per page instead of 10 - just for trial)
To really fill your report with empty details you will have to append empty rows to your data and use conditional supresses in your CR to not show things like '0' but IMHO this will get a real pain and you should go without printing empty details - never seen a situation where you need this or where it is desired.