Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Record and Lines in detail section Post Reply Post New Topic
Author Message
directred
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Online Status: Offline
Posts: 10
Quote directred Replybullet Topic: Record and Lines in detail section
    Posted: 14 Feb 2014 at 8:10am

I have a crystal report that has a maximum of 10 records per page. In some cases, the records go over to the next page so you  can have a page with 9 records and a page with only one depending on the record size i.e. name and address.

 
Is there a way to stop this or can I count the number of lines per page or is the record count the lines? I am also thinking about the idea of an index of the contents. The way I would do this, by counting the number of records per page
 i.e. 10 in say VB.Net, do a count via VB.Net and inserting the page number to a database. I know that there will be 10 to a page but if as above, my numbers go out by at least a one.
 
Friday night, I should be sitting with my feet up.
 
Thanks in advance.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 17 Feb 2014 at 7:23am
you can count lines, but the lines are the records.

if the data causes a field to grow, CR does not give you any indication that this has occurred, so it is not a perfect solution.

The alternative would be to see if a field would grow (but this also nothing but a rough estimate as CR does not tell you how much room a field needs, like you can do in .Net)...so based on how many characters are in the field you might be able to determine if the field is going to grow.

you can count the number of lines on a page using variables (probably a running total as well), just can grow can/will trip you up, as there is not really a way to limit the number of rows to 10 or should I say force there to be 10 rows on a page.

For the scenario you have, you want 10, but sometimes it is 9 & 1, and others 10, you would have to have room to add the 10th onto the same page and to suppress the newpage command until later.

Clear as mud, right?
IP IP Logged
directred
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Online Status: Offline
Posts: 10
Quote directred Replybullet Posted: 17 Feb 2014 at 7:35am
Thanks for this information.
 
I will give it a go.
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.008 seconds.