 |
Classics Forum
Re: Multiple columns of output on ACE
Posted By: Date:
Oops! You're absolutely right. Good thing this isn't a production report!
- Joe Vigil
Miguel Caldera wrote: > > I hadn't thought of this. I would have thought this could only be done > using 4GL... > > But wouldn't this also require an 'on last row' to flush out the last > few addresses if the number of total records is not a multiple of 4 > records? > > Something like if count < 4 then print... > > Miguel > > > -----Original Message----- > > From: forum.subscriber@iiug.org > > [mailto:forum.subscriber@iiug.org] On Behalf Of Joe Vigil > > Sent: Friday, February 28, 2003 10:17 AM > > To: classics@iiug.org > > Subject: Re: Multiple columns of output on ACE [111] > > > > > > At the bottom of this email is how we did this. > > > > - Joe Vigil > > > > Jay Zwagerman wrote: > > > > > > Hello again > > > > > > I have another question about the ACE report. I currently have a > > > report that prints out names and addresses on every row in > > the report. > > > So the output is like this: > > > > > > Name > > > Address1 > > > Address2 > > > City, State Zip > > > > > > Name > > > Address1 > > > Address2 > > > City, State Zip > > > > > > and so on. I was wondering if it is possible to create > > this output in > > > multiple columns like this > > > > > > Name Name Name > > > Address1 Address1 Address1 > > > Address2 Address2 Address2 > > > City, State Zip City, State Zip City, State Zip > > > > > > Name "" "" > > > Address1 > > > Address2 > > > City, State Zip > > -------------------------------------------------------------- > > --------- > > -- MULTI-COLUMN ACE OUTPUT > > -------------------------------------------------------------- > > --------- > > database avibank end > > > > define > > variable counter smallint > > variable a_vendor_name char(30) > > variable a_address1 char(30) > > variable a_address2 char(30) > > variable a_address3 char(30) > > variable a_city char(25) > > variable a_state char(2) > > variable a_zip_code char(10) > > > > variable b_vendor_name char(30) > > variable b_address1 char(30) > > variable b_address2 char(30) > > variable b_address3 char(30) > > variable b_city char(25) > > variable b_state char(2) > > variable b_zip_code char(10) > > > > variable c_vendor_name char(30) > > variable c_address1 char(30) > > variable c_address2 char(30) > > variable c_address3 char(30) > > variable c_city char(25) > > variable c_state char(2) > > variable c_zip_code char(10) > > > > variable d_vendor_name char(30) > > variable d_address1 char(30) > > variable d_address2 char(30) > > variable d_address3 char(30) > > variable d_city char(25) > > variable d_state char(2) > > variable d_zip_code char(10) > > end > > > > output > > left margin 0 > > top margin 0 > > bottom margin 0 > > end > > > > select vendor_name, > > address1, > > address2, > > address3, > > city, > > state, > > zip_code > > from vndmst > > order by vendor_name desc > > end > > > > format > > > > first page header > > let counter = 1 > > let a_vendor_name = " " > > let a_address1 = " " > > let a_address2 = " " > > let a_address3 = " " > > let a_city = " " > > let a_state = " " > > let a_zip_code = " " > > let b_vendor_name = " " > > let b_address1 = " " > > let b_address2 = " " > > let b_address3 = " " > > let b_city = " " > > let b_state = " " > > let b_zip_code = " " > > > > let c_vendor_name = " " > > let c_address1 = " " > > let c_address2 = " " > > let c_address3 = " " > > let c_city = " " > > let c_state = " " > > let c_zip_code = " " > > > > let d_vendor_name = " " > > let d_address1 = " " > > let d_address2= " " > > let d_address3= " " > > let d_city = " " > > let d_state = " " > > let d_zip_code = " " > > > > on every row > > > > if counter = 4 then > > begin > > let d_vendor_name = vendor_name > > let d_address1 = address1 > > let d_address1 = address1 > > let d_address1 = address1 > > let d_city = city > > let d_state = state > > let d_zip_code = zip_code > > > > -- PRINTING GOES HERE > > > > print column 1, a_vendor_name, > > column 41, b_vendor_name, > > column 84, c_vendor_name, > > column 128, d_vendor_name > > print column 1, a_address1, > > column 41, b_address1, > > column 84, c_address1, > > column 128, d_address1 > > print column 1, a_address2, > > column 41, b_address2, > > column 84, c_address2, > > column 128, d_address2 > > print column 1, a_address3, > > column 41, b_address3, > > column 84, c_address3, > > column 128, d_address3 > > print column 1, a_city clipped, column 24, a_state, > > column 27, a_zip_code, > > column 41, b_city clipped, column 65, b_state, > > column 68, b_zip_code, > > column 84, c_city clipped, column 108, c_state, > > column 111, c_zip_code, > > column 128, d_city clipped, column 152, d_state, > > column 155, d_zip_code > > skip 1 line > > > > let counter = 1 > > let a_vendor_name = " " > > let a_address1 = " " > > let a_address2 = " " > > let a_address3 = " " > > let a_city = " " > > let a_state = " " > > let a_zip_code = " " > > > > let b_vendor_name = " " > > let b_address1 = " " > > let b_address2 = " " > > let b_address3 = " " > > let b_city = " " > > let b_state = " " > > let b_zip_code = " " > > > > let c_vendor_name = " " > > let c_address1 = " " > > let c_address2 = " " > > let c_address3 = " " > > let c_city = " " > > let c_state = " " > > let c_zip_code = " " > > > > let d_vendor_name = " " > > let d_address1 = " " > > let d_address2= " " > > let d_address3= " " > > let d_city = " " > > let d_state = " " > > let d_zip_code = " " > > end > > if counter = 3 then > > begin > > let c_vendor_name = vendor_name > > let c_address1 = address1 > > let c_address1 = address1 > > let c_address1 = address1 > > let c_city = city > > let c_state = state > > let c_zip_code = zip_code > > let counter= counter+ 1 > > end > > if counter = 2 then > > begin > > let b_vendor_name = vendor_name > > let b_address1 = address1 > > let b_address1 = address1 > > let b_address1 = address1 > > let b_city = city > > let b_state = state > > let b_zip_code = zip_code > > let counter= counter+ 1 > > end > > if counter = 1 then > > begin > > let a_vendor_name = vendor_name > > let a_address1 = address1 > > let a_address1 = address1 > > let a_address1 = address1 > > let a_city = city > > let a_state = state > > let a_zip_code = zip_code > > let counter = counter + 1 > > end > > end > > > > ------------------------------------------------------------------ > > This message, including any attachments, contains confidential > > information intended only for a specific individual and purpose. > > It contains information which is private and legally protected by > > law. If you are not the intended recipient, please contact the > > sender immediately by reply e-mail and destroy all copies. You > > are hereby notified that any disclosure, copying, distribution or > > use of the contents of this transmission, or the taking of any > > action or reliance thereon, is strictly prohibited. > > ------------------------------------------------------------------ > > > > > >
------------------------------------------------------------------ This message, including any attachments, contains confidential information intended only for a specific individual and purpose. It contains information which is private and legally protected by law. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, distribution or use of the contents of this transmission, or the taking of any action or reliance thereon, is strictly prohibited. ------------------------------------------------------------------
Messages In This Thread
Classics Forum is maintained by Administrator with WebBBS 5.12.
|
 |