Dan

We store a keyword string in a field used in a bunch of reports:
You make want to insert commas with every addition
to make your string more readable.  I store the  keystring
in a field in the same row, because it is in so  many reports.

IKE

--***********************************************************************-
--ProcKey.cmd                  Processes keywords for people    --
--Run after edit form -- vID# is the number of the row passed to
--  this program.  The Keywords field stores a string of values
-- built from the KeyCode field in a related table,  Keylink.
--   Keycode is one of the  Keywords we've  assigned to a person. --
--*************************************************************************-
set err mes off
set mes off
set echo off

drop cursor c1
set var vNEWTEXT text
set var vKEYVAR text
set var vIDVAR integer
set var vKEYVAR to ''
set var vNEWTEXT to ''

DECLARE C1 Cursor FOR SELECT ID#, KeyCode from Keylink where ID# = .vID# +
 order by ID#
        open C1
        FETCH C1 into vIDvar, vKEYVAR
WHILE SQLCODE = 0 then
        set var vNEWTEXT to (.vNEWTEXT & .vKEYVAR)
        FETCH C1 into vIDvar, vKEYVAR
ENDWHILE

   set rowlocks on
         UpDate Master set Keywords to .vNEWTEXT  where ID# = .vID#
   set rowlocks off

DROP CURSOR C1
clear var vNEWTEXT, vKEYVAR, vIDVAR, vID#

At 12:55 PM 8/30/01 -0700, you wrote:
I am trying to put multiple rows of data from one table into a report variable of another table.
 
sample data
 
invoicenum    tracking_number
----------------    -----------------------
12345            509-588956
12345            509-589654
12345            508-649710
 
I would like to have all the tracking numbers on the report placed into one variable but I can not figure it out.
 
Dan
 

Reply via email to