I'm new in crystal report, i want to make a limit of number record that display in one page. I'm using this formula "if Remainder (RecordNumber, 11) = 0 then true else false"
It's works, I have 20 records it divided into two page. But at the end it shows an extra page header. Anyone know how to remove the extra page header? Please help, Thank You
Extra page header after add limit details formula
Related
am using crystal report in C# asp.net ..
i need help on this :
and am trying to make my report start from number 5 NOT 1
i tried to write PageNumber=5; like this :
in footer group -> section expert -> reset page number after -> formal Editor -> PageNumber=5;
its reset after page 5 .. i want it from beginning start from a number i give ..
also i try it on new page before and i add it there it not work
what should i do ?
thanks
Don't go to reset page number instead create a formula and write below code and place place in page footer.
Create formula #Page Number
pagenumber+4
Now place above formula in page footer
Is there any way to catch a break in the table in order to insert a "Continued on next page" row? I've tried checking each row to see if the HeaderFormat is -1 (as I set headers to repeat on subsequent pages), but that doesn't work. I suppose I could count rows and guestimate, but I'd rather have an exact point at which to insert the new row at the bottom of the table before it breaks onto another page.
I found a solution. This post describes how to find the page number from a range. You can call this with the range of a row and check when the page changes. When the page changes go back a row index and add the "Continued..." text.
I would like to know if there is a way to detect if the last row in a table is exceeded the page and if so write it on the next page and write the table header to the next page as well.
I don't want to use table.KeepTogether = true; because if the table is longer than 1 page it just move the exceeded rows to the next page without the header.
The table does not start from the beginning of the page, so using the onStartPage() event is not good.
This is how it looks when the table is exceeded 1 page:
Hope that someone can help me here.
Thanks!
Seems like you want the repeating header functionality as described in the HeaderFooter1 example. For the corresponding C# examples, see http://tinyurl.com/itextsharpIIA2C04
For instance, if table is an instance of the PdfPTable class and the first row needs to be repeated when the table is split in two, then you need to add this line:
table.HeaderRows = 1;
Now the first row will be repeated automatically.
This is the code i am using now to Suppress the page header.
1)
Shared numbervar rownum := 0;
rownum
Used a shared variable to calculate rows in a page and placed this in page footer to reset on every page
2)
Shared numbervar rownum;
rownum := rownum + 1
calculating rows and placed this in the details section.
Both these fields are suppress in the report so that the user cannot see them.
Now in the Page header i have placed the below formula
if Shared Numbervar rownum < 1
then true
Else
False
This works like a charm...but if there are no records in the second page it show a blank page.Details section keep Together checkbox is enabled.
Let me know how to avoid this.
----------Solution for Blank page ------------
Report Footer doesnt contain any data and I didnt suppress it.Show the blank page was displayed.Now that I suppress it its working fine.
here ends the search for solving the page header suppression when not using Groups.
Thanks.
First of all, I would advise to use a Group instead of putting the data in the Page Header. That will make your life a lot easier. If that is not an option, create a Running Total. As the field to summarize use one of the fields in the Detail Section (Paracetamol, Crocin). Do a count as the type of Summary. Under Evaluate choose "For each Record". under Reset, choose "On change of Field" and choose a field from your Header Section (Item Description). Now put that running total in your detail section. Check the values and make sure that it numbers each record correctly and resets if there is a new item in the Page Header. Now do a suppress statement in the Page Header that goes like RTotal0 < 1. That should suppress your Page Header if there are no records in the detail section.
Finally got the solution
This is the code i am using now to Suppress the page header.
1)
Shared numbervar rownum := 0;
rownum
Used a shared variable to calculate rows in a page and placed this in page footer to reset on every page
2)
Shared numbervar rownum;
rownum := rownum + 1
calculating rows and placed this in the details section.
Both these fields are suppress in the report so that the user cannot see them.
Now in the Page header i have placed the below formula
if Shared Numbervar rownum < 1
then true
Else
False
Suppress any blank footers if not used to avoid blank pages.
Cheers.
I have created around 9 crystal reports today and I noticed a problem in all the reports. Below is the link for the design of my report. I am not using any SP or View , just loading the gridview data by using a dataset.Now when I click on Print button in the front end..if the records are less than like 10 all of them are displayed in the first page but the summary in the second page is overlapped with the details as shown below link
http://www.facebook.com/photo.php?fbid=164068347074025&set=a.164065450407648.38272.100004125821604&type=3&theater
http://www.facebook.com/photo.php?fbid=164068363740690&set=a.164065450407648.38272.100004125821604&type=3&theater
Please help me with the below queries 1) Why the Page header and Details layout are displayed in the second page even when there are no records. 2) Why the Report footer is getting overlapped. Thank you.
1) Why the Page header and Details layout are displayed in the second page even when there are no records.
as per you choose page size , the content of your data will made this thing. second chance is in your design , you may be given more space horizontally between header, section , footer.
2) Why the Report footer is getting overlapped?
for this set properties(print at bottom) true in section expert(where section name written right click of any section )
http://arsalantamiz.blogspot.in/2008/09/how-to-handle-overlapping-of-large-text.html