Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Print multiple copies of a label Post Reply Post New Topic
Author Message
fouguy01
Newbie
Newbie


Joined: 13 Apr 2010
Online Status: Offline
Posts: 3
Quote fouguy01 Replybullet Topic: Print multiple copies of a label
    Posted: 19 Apr 2010 at 9:32am
Hello everyone. I've created a report that print a card(label) for every items of my inventory. In my database, I have a field that is telling me the number of copies of each label I need to print. Since I have only one line per item in my database, how can I print the quantity of label needed?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 20 Apr 2010 at 3:11am
the only way that has been suggested is to use a stored procedure that will create as many lines of an item as the number stored in the database.  By itself, CR cannot manage an arbitrary number.  By which I mean, if you only needed 3 (let's say) you could join the table to itself 3 times and so trick CR into seeing 3...but that is not the case here.
 
HTH
IP IP Logged
fouguy01
Newbie
Newbie


Joined: 13 Apr 2010
Online Status: Offline
Posts: 3
Quote fouguy01 Replybullet Posted: 26 Apr 2010 at 4:48am
Here's the solution I found on another site... worked perfectly for me.
 
Problem:
A typical situation is where a number of label copies  must be printed for each order according to the {quantity} field in each order record.

Solution:
Create a REPEATER table with a single column (How_Many) that looks like this:

How_Many
1
2
3
4
5
6
etc.

Now, in your report, add the Repeater Table and add a join
condition of:
CODE
Order.quantity >= Repeater.How_Many

If the ">=" join option is not available, remove the join to the REPEATER table and create this condition in the Record Selection condition:
CODE
{Order.quantity} >= {Repeater.How_Many}

If you are restricted to using an equal join, you can also modify the repeater table to include N records for each quantity N:
1
2
2
3
3
3
...

This would cause each order to be duplicated as many times as the value of {Order.quantity}.  
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 26 Apr 2010 at 7:39am
Interesting solution...While not the most elegant is very effective. 
 
It would be a pain to implement if you're not allowed to alter the database, but otherwise a great solution.
 
Thanks for sharing.
IP IP Logged
fouguy01
Newbie
Newbie


Joined: 13 Apr 2010
Online Status: Offline
Posts: 3
Quote fouguy01 Replybullet Posted: 26 Apr 2010 at 10:18am
You can simply create a new database with Access or a simple Excel file, that's what I did and it worked. So no need to alter the actual database. All you need is that all users get acces to the new file.

Edited by fouguy01 - 26 Apr 2010 at 10:19am
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.