Mailing Label Report [message #410542] |
Sun, 28 June 2009 06:37 |
hiso476
Messages: 2 Registered: June 2009
|
Junior Member |
|
|
Hi All,
I am working on a report in which i have to print the labels of PO's in an A4 size sheet.
The number of times the same PO Label should be printed should be equal to the quantity of the PO.
Need suggestions for the approach.
-
Attachment: sample.doc
(Size: 38.50KB, Downloaded 1742 times)
|
|
|
Re: Mailing Label Report [message #410964 is a reply to message #410542] |
Wed, 01 July 2009 05:46 |
dude4084
Messages: 222 Registered: March 2005 Location: Mux
|
Senior Member |
|
|
Basically what i understand is that you want to repeat the number of labels EQUAL to quantity of that label.
So here is the idea to do this work.
Basically you have to repeat the rows equal to number of quantity in that particular row. e.g. Your PO table is as follow:
Quote: | Item Code Qty
211.123 5
545.366 2
|
Thus you have to repeat row 1 by 5 times and row 2 by 2 times so that you get 7 prints of labels.
Here is guideline.
Create a table as follow:
Create table myno (to print number(3));
Insert into myno values (1);
Insert into myno values (2);
Insert into myno values (3);
. . .
. . .
Insert into myno values (999);
Insert 999 rows or equal to maximum number of quantity expected in future.
Now run following query
Select *
from PO a, myno b
where a.qty>=b.myno;
This will give you 7 rows
Good Luck
-Dude
N.B.
I think there are definitely more methods to achieve this task.
|
|
|