-1

I run the statement below. However, the result did not display in one row. It automatically puts the result in several rows. It is too difficult to read.

How to put the result in one row? I have same issue when I export the result to a .csv file.

enter image description here

 FOR EACH r4_wms.wShipmentDet NO-LOCK,
      FIRST r4_wms.wShipment OF r4_wms.wShipmentDet NO-LOCK where wShipment.shipmentNO>5000,
      FIRST r4_wms.wOrder OF r4_wms.wShipmentDet NO-LOCK,
    FIRST r4_wms.wOrderline OF r4_wms.wShipmentDet NO-LOCK
    BY wShipment.ShipmentNo DESC:


     Display
         wOrder.OrderNo
         wOrder.OrderDate
         wShipment.ShippedDate
         wOrder.CustID
         wOrder.sourceDoc
         wOrder.srcPO
         wShipmentDet.ShipStatus
         wShipment.appointmentdate
         wShipment.Appointmentno
         wOrder.shiptoName
         wShipment.carrierID
        wShipmentDet.ItemID
        worderline.qtyorder
        worderline.QtyShipped
         wShipment.Volume
         wShipment.Weight SKIP
        wOrder.Remarks.

 END.
Cœur
  • 37,241
  • 25
  • 195
  • 267
Joe
  • 31
  • 4

1 Answers1

4

Do you really want to display all those fields in a single line? That will be a wide line....

Using the DISPLAY statement Progress will assume an old style 80 characters wide terminal. You can override that using a FRAME or a display format.

For instance:

DISPLAY ... WITH FRAME frameName WIDTH 320.

But maybe the max width (320 is maximum) won't help you. You could instead try to display it in one column:

DISPLAY ... WITH FRAME frameName 1 COLUMN.

And so on... Read up on the frame phrase here: https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dvref%2Fframe-phrase.html%23wwID0E2USW

When you export to a file you shouldn't use DISPLAY at all. Then you should use EXPORT. That way you will not get the display format in the file but just the data:

OUTPUT TO c:\temp\file.csv.
EXPORT tablename.
OUTPUT CLOSE.

If you want to use a custom delimiter you can do that as well:

EXPORT DELIMITER "|" tablename.

You can also export specific fields:

EXPORT DELIMITER table.field1 table.field2.

etc.

Jensd
  • 7,886
  • 2
  • 28
  • 37