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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can grow field

Status
Not open for further replies.

cardi

Programmer
Joined
May 30, 2007
Messages
29
Location
CA
I need to get the number of line printed in a "can grow" field. I'm using the version 9 of crystal. I want this to see where I am in the page (for layout). My field names "Description". I want to store that in a cumul variable because after I will use that to calculate and put images at the good place.

Can you help me??

Thanks
 
Using Length({your.field}), you can get the number of characters. Depending on font etc., that might allow you to handle it.

An alternative is to divide the field into a number of lines using Mid on the basis of Lenght.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Sure, but each may not contain the same number of character. If a long word is at the end of the line, it will be printed on the next line. And it's the same thing for small word. They can filled all the line. So, if I divide by 50 (example), one line can contain 40 characters and the next can contain the 50 characters. Also, a 'i' not take the same width as a 'w'. If a line contain a lot of 'i' and the other a lot of 'w', it's not the same number of characters on the same line.

We cannot get a property for the field (i.e. nb lines printed). It will be easier. does that exist ???

Thanks for your reply, I appreciate
 
Nope.

Nor does the good place for images.

But there's probably a way to handle your requirements, try posting example data and expected output instead of dictating architecture.

-k
 
I Know that it seems strange, but it's my boss who wants that. But, if I can have something of interesting, I will can take this pattern to calculate the page break.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top