Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: exact Line Count from subreport Post Reply Post New Topic
Author Message
vanitha
Newbie
Newbie
Avatar

Joined: 10 Sep 2009
Location: India
Online Status: Offline
Posts: 8
Quote vanitha Replybullet Topic: exact Line Count from subreport
    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
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
vanitha
Newbie
Newbie
Avatar

Joined: 10 Sep 2009
Location: India
Online Status: Offline
Posts: 8
Quote vanitha Replybullet 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?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
vanitha
Newbie
Newbie
Avatar

Joined: 10 Sep 2009
Location: India
Online Status: Offline
Posts: 8
Quote vanitha Replybullet 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.

 

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.