Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate total space on a page - store as a constant Crystal 10

Status
Not open for further replies.

eleale

Instructor
Dec 10, 2010
2
Hi:

I have a form that contains multiple groups and detail lines - I need to count the records and spaces on the page to force the Page Breaks by line count.

1. How do you determine the lines in a section - is this possible?
2. How to you count the number of groups and detail lines printed on a page?

Thank you!
 

You would use a variable that increments by one for each detail and group section. This assumes that each section size is the same, which is doubtful. In that case you'd have to determine that, for instance, if GH1 is twice as tall as the detail section, you'd have to increment the variable by 2 for each GH1.

But if record count = distance down the page = page break, can you set your page footer for the amount of space you need reserved at the bottom of the page and be done with it?

Describe in more detail your requirements and maybe there's a better way.
 
That makes sense, the size in the section - going to take some major testing on my part if I go that route. Usually when I need to have the form print X amount of lines I don't have so many groups and detail sections to deal with. Ihave the record count variable for the Details and Groups - I'm trying to figure out how to determine the section size for the PageHeaderA, PageHeaderB - they don't print on every page.

The general idea is to have control of where the page is breaking depending on how many lines are on the page. The form is an invoice/statement with several transactions and multiple detail sections and groups - depending on the data - then the tax summary portions can be different sizes.

Thank you for your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top