I would think the temp table approach would offer limitations to your cursor 
and make it easier and you could just include columns and add additional for 
count etc that you would not want in the permanent table with the possibility 
of increasing db foot print size 

Paul 
sent by Paul using his BB~Storm

-----Original Message-----
From: "Jim Belisle" <[email protected]>
Date: Mon, 21 Dec 2009 07:55:10 
To: RBASE-L Mailing List<[email protected]>
Subject: [RBASE-L] - RE: shipping labels

John,

 

This is what I needed to get started.  I am a novice in the area of the
while loop, though I have used it in the past.

I will read up on that and hopefully learn enough to accomplish this
task.  Thanks for pointing me in the right direction.

Could I use the while loop approach in the report itself rather than
using the temp table approach? Just wanting to know.

 

Jim

 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of John
Engwer
Sent: Monday, December 21, 2009 7:50 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: shipping labels

 

Jim,

 

You could use a while loop to accomplish that task.  The while loop may
be in the execution section of a Declare cursor.  Use the cursor to pull
up each line item of the order including the line item quantity.  When
you enter the while loop set a VAR such as vQTY = to the quantity of the
line item  and use the quantity field in the line item to construct the
while loop (While vQTY > 0 ..... endwhile).  The while loop would
contain an insert command and a SET VAR = (vQTY -1).  The while loop
would produce a quantity of records in the temporary table equal to the
line item quantity in the order.

Go to the RBASE help an read about While/Endwhile before you start.

John

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Jim
Belisle
Sent: Monday, December 21, 2009 8:20 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: shipping labels

 

John,

 

If I go your route, I would still have turn the one row with four pieces
(row 3) into four rows.  

I had thought of that. What code would I use to accomplish that?

IF pieces > 1 THEN

?

 

Jim

 

 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of John
Engwer
Sent: Monday, December 21, 2009 7:13 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: shipping labels

 

Jim,

One way to achieved the results you are looking for is to first build a
temporary table containing one row of data for each label.  The table
should contain a column for every item of data that you want to appear
on the label plus one auto number column.  The auto number column would
be used to identify the label as 1 of 6 etc.  

Then use label designer to produce the labels based on the temporary
table.

 

JOhn

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Jim
Belisle
Sent: Monday, December 21, 2009 7:49 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - shipping labels

 

Presently our Bill of lading program prints labels in this manner.

Let's say I have three rows of data for a bill of lading as below.

                        Pieces  Wgt/pc  total Wgt

Row one:              1         346        346

Row two:              1        845        845

Row three:            4         400       1600

 

The Program will print 6 labels; one each for the first two rows and
four for the third line.

Each label will show 1 of 6, 2 of 6, etc. and the weight as such

 

1 of 6    wgt 346

2 of 6    wgt 845

3 of 6    wgt 400

4 of 6    wgt 400

5 of 6    wgt 400

6 of 6    wgt 400

 

What function or command would I use to duplicate this process?

 

Jim

 


Reply via email to