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

Printing number of labels dependant on field value

Status
Not open for further replies.
Oct 12, 2005
204
GB
Hi,
I know this question has been asked many times before, but I was just wondering if any new way has been discovered to do this. i have seen the idea that you add another table with numbers 1 ..... 2000 or whatever you want but this is not possible for me, I am using Crystal XI is there any other way to accomplish this?

Regards,

Mick.
 
This is the simplest way. If you don't have permissions to add a physical table you can use a command and generate it on the fly. What is your database type ?

Viewer and Scheduler for Crystal reports, SSRS and Dynamic Dashboards.
 
Peter,

Thanks for your reply, the database is Oracle 10g.

Regards,
Mick.
 
Hi,
I have got this working by using excel as a table for the label amounts and this works fine, although I think I'll look at creating a table in the database to do this.

This brings me onto another issue i have, is there a way to show 'part' quantities on the label. ie. if we have a total amount of 205 and each box can contain 40 there should be 5 labels with 40 as the qty and then 1 box with 5.

Any help/suggestions would be appreciated.

Regards,
Mick.
 
Whiere is the information on how many fit in a box available? Is there a file that says 40 widgets fit in a box, but only 20 gadgets fit in a box?
 
Hi Charliy,

In the view I'm using for the report there is a field for qty_needed, package_qty, I've also added a field which is qty_needed/package_qty which gives amount_labels ( I need a bit of advice here as I can't get it to round up to whole numbers, ie if the amount_labels = 6.125 it needs rounding up to 7 labels, 6 full boxes and 1 part qty box )

So really I have 2 issues but both centre around the same problem.

Any help would be appreciated.

Regards,
mick.
 
Hi,
Well I've moved on a little I managed to figure out the rounding issue by using ceil, this is now working fine, I also had a little success with getting the remaining amount to show on the labels by using the formula below:

if {Sheet1$.Number} = {VIEW.LABEL_QTY}
then Remainder ({VIEW.LABEL_QTY}, {VIEW.PKG_QTY} )
else {VIEW.PKG_QTY}

This works great if there is a remainder, but if there isn't then all I get is 0. I know this is going to be a simple change, but I can't see it.

Any help much appreciated.
Regards,
Mick.
 
I think I've got it... The formula below is giving me the results I need. So I think I should be good to go now.


if {Sheet1$.Number} = {VIEW.LABEL_QTY}
then
(if Remainder({VIEW.REVISED_QTY_DUE}, {VIEW.PKG_QTY}) <> 0
then remainder({VIEW.REVISED_QTY_DUE}, {VIEW.PKG_QTY})
else {VIEW.PKG_QTY})
else {VIEW.PKG_QTY}

Thanks for all your help with this.

Regards,
Mick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top