Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Printing Bills (Preprinted Format) Post Reply Post New Topic
Author Message
karthikkjm
Newbie
Newbie
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 21
Quote karthikkjm Replybullet Topic: Printing Bills (Preprinted Format)
     Posted: 23 Jan 2012 at 1:37am
i want to print a bill in the preprinted paper. in  this paper client's logo and lines and boxes are already printed. i handled the report by avoiding "Can grow" property for the products column and using the formula in "Next Page After" in details section, to print the products with in the given area in the paper.

in the "Next Page After", i wrote a formula like this,
if(RecordNumber = 30)
then true
else false.

but now my clients asking me to print the products details fully. if i am giving "Can grow" property means, then i am not able to handle the printing with the given area.

but now i need to count the "line number", please help me, how to count the line numbers (not the record numbers).

thanks in advance,
Karthik K
karthik
IP IP Logged
JohnNash
Newbie
Newbie
Avatar

Joined: 10 Jan 2012
Online Status: Offline
Posts: 11
Quote JohnNash Replybullet Posted: 23 Jan 2012 at 11:24pm
I worked on Pre-printed stationary long back, its really hectic to do it, you should be sure with the printer drivers.Line number will depend on the printer and the paper size,
IP IP Logged
karthikkjm
Newbie
Newbie
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 21
Quote karthikkjm Replybullet Posted: 24 Jan 2012 at 10:01pm
thank u for ur reply.

actually what i want is, any way to print or calculate line number (not the record number).
karthik
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 26 Jan 2012 at 9:42am
Not directly.  You would need a formula that can use the field to be printed and calculate how many lines it would take (i.e. if the width of the field comes out to 40 characters and the data is 80 characters long, then it will take up two lines).  Of course this only works with a fixed width font.
IP IP Logged
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Posted: 29 Jan 2012 at 9:14am
You can create a formula that calculates the number of lines required for the description field - if your print area is 40 characters and the description is 90 characters then the value would be 3 - add this to a stored variable for each record to get line count.  You would then go to the next page when that number exceeds a certain amount.
 
The only other issue would be fixed vs. variable fonts as was mentioned - if you use variable fonts then you would have to figure the worst case width (least number of characters that fill the space) in which case you would occasionally use more lines than needed
 
Hope this helps,
Cyber-guys
IP IP Logged
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