开发者

Set the height of Details section Crystal Reports

The no of i开发者_如何转开发tems 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜