Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Create Duplicate Lines Post Reply Post New Topic
Author Message
matthewbrain
Newbie
Newbie


Joined: 28 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote matthewbrain Replybullet Topic: Create Duplicate Lines
     Posted: 28 Jan 2013 at 4:41am
Hi Everyone, this is my first post on this forum.

I have an issue that I have spent all day trying to resolve.
Have a report that prints out A4 labels (designed in a group header) that are attached to pallets in a warehouse.

The items need different labels quantities for each product, so as an example I am trying to do this:

Item1    Description     4
Item2    Description     7
Item3    Description     12
Item4    Description     3
Item5    Description     5

The warehouse staff have a report viewer, and I just want them to be able to open a RPT file and hit print, and it will know to print 4 identical copies of it Item1, 7 copies of Item2, 12 copies of Item3 etc.

I have calculated the number of pages required in a form (that displays in the group header), does anyone know if this can be done? Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2013 at 5:00am
usual solution is to add a table that is a "numbers table", one row per number. join your other table to this but make the join as the table.numner <= table.totalfield
This creates as may duplciate rows as you need per label.
IP IP Logged
matthewbrain
Newbie
Newbie


Joined: 28 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote matthewbrain Replybullet Posted: 28 Jan 2013 at 5:19am
Thanks for the reply.

How can I join to a calculated formula?

Thanks again
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2013 at 5:43am
you cannot. There is nothing inteh DB that would allow you to know before you get the data intot he report?
IP IP Logged
matthewbrain
Newbie
Newbie


Joined: 28 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote matthewbrain Replybullet Posted: 28 Jan 2013 at 5:51am
No sorry, the amount of pages to be printed has to be calculated.

In the past I have scheduled a excel export, and read the data from an external spreadsheet, but the data is produced so dynamically that I have to calculate the data live.

Regards
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2013 at 6:34am
can you replicate the calculation in a stored procedure or a soemthing like that?
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