Set size of detail section in Crystal Report - crystal-reports

I m generating Bill report using crystal report in VS2008..in that, details section size is dynamic.
i.e. depend on number of records, it changes. so if I've 10 records the report view is full page that is k ..but if i have 2 records in details sections, then whole page footer section getting stick to details page..so whole alignment is getting change
so is there any way to set details section fixed i.e. for 10 records and if records exceed more, then all records on same page and remaining data will go on next page i.e report footer,page footer.
Is there any setting in crystal report

Ok, i can give you some tips on how you can approach your desired outcome.
The Crystal Reports engine has the following characteristics.
The Report Header appears on the top side of the first page only.
The Page Header appears on the top side of every page (on the first page it is under the Report Header).
The Report Footer appears only once, on the bottom side of the detail section on the last page.
The Page Footer appears on the bottom side of every page.
There is a capability in every section that allows you to suppress it if you don't need it. It can be done by right clicking the bar of the section that you want to suppress and pressing the suppress choice from the menu that will appear.
Consider the 2 following cases.
If you want to achieve the first case, change the height of the Page Footer to a value that will allow only 10 records to show on the Details section, include all the footer information in the Page Footer and suppress the Report Footer. If you want the same result but with the footer information appearing only on the last page, right click the bar of the Page Footer and select Section Expert. From there, press the x+2 sign next to the Suppress CheckBox and add the following code there.
if pagenumber <> totalpagecount then
true
else
false
If you want to achieve the second case, change the height of the Page Footer to a value which will allow only 10 records to show on the Details section and include all the footer information in the Report Footer section.
In both cases the Report Header is suppressed.

Go to Section Expert
select report footer
Tick the Print at bottom page and Keep together option
Problem will be solved

First of all fix height detail section by right click on detail section Detail Section->Section Expert click on paging Tab->Check in New Page Before checkbox and beside it (x+2)button write formula-> (Suppose you want 8 rows to display in your report per page and additional rows(9th row,10th row and so on... to another page) IF Remainder (RecordNumber, 9) = 0 THEN TRUE ELSE FALSE so now your height is fixed.. and for blank rows suppose 2 records/rows are coming from data table/data source then from 8 fixed rows , 6 rows should be blank rows for that.. design your detail section with fields and keep report footer(section 4) blank with with some spaces(i want 8 rows fixed so keep size of 8 rows blank assuming in report footer) and put footer details in your section 5(page footer)..
if your header or footer is not visible on another page then put all header parts details in page header and footer details in page footer
:)

Related

Issue with Column footer and Summary bands

I am creating invoices with JasperReports.
I have a Detail section that has the list of all items followed by a column footer which has Totals, Tax etc., and then the return policy in the Summary section.
I want to always ensure that the Detail is followed by Column footer followed by Summary bands. How can we ensure this? I found that sometimes the Summary comes before the Column footer.
Can someone throw some light on this?
There really is not much of a solution to this at the moment as it seems to be by-design and not a bug (personally I think they should have an option for this). Your options at the moment though are:
Create a Report Group (this is essentially a dummy report group,
doesn't really matter). Move your Column Footer contents into the
Group Footer band, and leave your Summary in the Summary band.
This seemed to work in my limited tests, and I would try it first.
Set Float Column Footer and Summary on new Page to true under the
main report properties. This has the unfortunate side effect that the
summary will always be printed on a second page regardless if
everything could fit on one.
Set Float Column Footer to true and move your Summary section to
the Last Page Footer band. This means it will only be printed once,
but the content will be oriented towards the bottom of the last page.
Edit: For the shed some light on this part of the question. It is by design. The Column Footer is seen/treated as essentially a specialized Page footer. So body content (detail band, summary band, etc.) are placed on the page above it always. The only time it does not seem to happen is when the summary is printed on a new page, after the last Column Footer has been printed. So it is by design.
I've been looking for answers to this silly formatting question for hours, and I think I might have found a useable solution:
move your Column Footer content to the Page Footer and,
create a Last Page Footer but set its width to 1 pixel with no content inside
This allowed me to have some borders/subtotals at the bottom of every column, whilst ignoring the footer-before-summary/total-before-subtotal problem on the last page because the Last Page Footer overwrites the Page Footer (summary) content.
Add a last page Footer , in that add the content of your column footer after that increase band width and add the summary content into that(last page footer) and remove the content from the summary band.

Crystal Report - Hide specific pages

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.

Jasper Report group footer not printing immediately after detail band

I have introduced the group to the report.
I would like to make sure that group footer is printed immediately after detail section.
My group footer has 200 height therefore if there is less than 200 px left on current page, the group footer is mover over to the next page.
Is there a way to start group footer right after detail band (even though it will not fit on current page and part of it will be moved over to next page)
Please not ‘isSplitAllowed’ is set to true for the group footer band
I will appreciate your suggestions, thank you
You can try the design like this:
The height of textfields elements are equal the band's height.
The result will be:

Making report footer to appear just below the last page records

I am using Crystal Reports with VS-2005.
I have a report with a report footer section comprising of sum totals of a column. The problem is that in some cases, the records consume the entire page and the report footer alone appears on the next page. It looks awkward. I want the report footer to appear just below the last record row ended.
Is there any trick to make the report footer section fit on the last page itself?
If you aren't using grouping, try this:
Add an additional section below your last detail section.
In Section Expert, mark the detail section Keep Together.
For the suppress formula for the new section, specify Not OnLastRecord.
Move the content from the report footer to the new detail section.
If you are using grouping, do this in the last group footer instead, and in Group Expert, mark the group Keep Group Together.

Set the height of Details section Crystal Reports

The no of items in my invoice never gets more than 10. When its only one item in invoice(one row in details section) the report footer shows very up.
I want that I should fix 10 rows for the details section, when there are less rows, the remaining rows to make it 10 should be showed as blank lines.
I need the footer to appear at the same place all the time, irrespective of how many items are there in the invoice(never gets more than 10).
Please suggest solution.
Just use Sub Report and Fix the height of the sub report
then you will be able to display fix page.
I am not exactly sure what you are asking, but I will make some guesses with possible solutions.
If you print multiple invoices per report, you can group on the invoice designator, and set the report to start every invoice on a new page. In addition, you can force a new page when the record count goes over 10 rows. There are various ways to do this, but the simplest would be to add a counter that is set/reset at the start of an invoice, and then conditionally force a "new page before" if that counter reaches 11. You can also set this to force a new page for every n + 1 records (the 11th record, the 21st record, the 31st record, etc.)
If you just don't want the report footer to show up, you can either suppress it or issue a "new page before" on report footer. This is handy if you keep a summary page for reference (# of invoices in run, total balances, etc.).
If you just don't want a floating footer, you can select "print at bottom of page" for any section. This is handy for group totals. That, with "Repeat Group Header on Each Page", you can get some very nice looking invoices.
to fix height of detail section ..suppose i want size of 8 rows/records then
right click on detail section ->section expert ->on paging tab-> check on New page before beside button (x+2) write formula below given..
IF Remainder (RecordNumber, 8) = 0 THEN
TRUE
ELSE
FALSE
I know this question is really stale, but here's how to do what the OP asked.
You need to do 2 things. Find out the amount of real estate you need on the page for the 10 rows, and create a group footer that is that size directly beneath the detail line (e.g 2" or 5 cm).
Then, go into the section expert for the detail line and check the Underlay Following Sections box.
If you are ever going to have more than 10 detail lines, you also need to go to New Page after on the Paging tab and put in 10.
Put all fields Top = 0
Decrease section height.
Now, you have to set fields top dynamically.
Like this:
cr.Section1.ReportObjects.Item("Line1").Top = 0
cr.Section1.ReportObjects.Item("Line2").Top = cr.Section1.ReportObjects.Item("Line1").Top + cr.Section1.ReportObjects.Item("Line1").Height