Print Page | Close Window

exact Line Count from subreport

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7659
Printed Date: 29 Apr 2024 at 8:09am


Topic: exact Line Count from subreport
Posted By: vanitha
Subject: exact Line Count from subreport
Date Posted: 11 Sep 2009 at 12:34am

Hi,

I have created report to print each customer details on saperate page, having four detail sections and the forth detail section will act as a footer and printed at the bottom of each customer statement.
second details section is subreport which customer details,second detail section may extend to number of pages.
 Now my issue - If record count is increased, it prints first three detail section on one and the footer detail section(fourth detail section) on separate page, which means a blank page only with footer.
I used reocrdnumber for page break but each record's line count varies , so recordcount won't work here. 
 
I need to find line count rather than a record count so that i can break page easyly.
 
 
 
vanitha



Replies:
Posted By: lockwelle
Date Posted: 11 Sep 2009 at 6:47am
use a formula and shared variable.  increment the variable for every line that you wanted counted, in both the main and the subreport.
 
should work.
 
HTH


Posted By: vanitha
Date Posted: 11 Sep 2009 at 6:52am
Have tried but it counts for each record(row), but line's for each record may vary in my case.. So Is their any other way to count number of line printed not the number of records printed?


Posted By: lockwelle
Date Posted: 11 Sep 2009 at 7:25am
if your 'lines' are bigger than 1 record, say you have 'Can Grow' enabled, then no, there is no way to know how much space a line took up.  You can devise mathematical models to guess...say your value is 150 chars long and there is only room in the field for 60, you can guess that the line is really 3 lines high (150 is 2 full lines of 60 and 1 partial of 30) and adjust the variable, but with font sizes and spacing, it is at best a guess.
 
also if you have multiple detail lines for the same record, you would, of course, need to increment each line that is printed...might be 4 detail lines, but only 1 record.
 
HTH


Posted By: vanitha
Date Posted: 14 Sep 2009 at 3:38am

thanks lockwelle,

you are rite, If i uncheck "can Grow" then I can able to get line count.

 




Print Page | Close Window