User-Defined Reports - Output to CSV


Datafile Software

User-Defined Reports – Output to CSV

A common use for User-Defined Reports (UDR) is to create a formatted CSV file to output records from a database (say a BACS payment list from the purchase transaction file).

When creating a CSV from a UDR definition then each row on the report creates a row on the CSV file.When outputting large data items then the maximum width of 256 characters per row can be insufficient.

This new option allows for the insertion of a special character at the end of the row which, at run-time, is interpreted to suppress the new row creation and continue with the next row of report items on the save CSV record.

Installation

If the report is configured for CSV output within the ‘Report / W.P. Disk Tools’ parameters, and configured for the new font designer, then within the data item category ‘Report Constants’ is a new option for ‘Line Continuation Marker’.

This item should be added as the last item on any one line of the UDR.

Notes

If the report is printed then this character is ignored.

This option cannot be used over a control block – on change of control block (say $HEADER to $RECORD) a new row is always inserted on the CSV.


Custom Fields

Article ID: 320
Created On: Wed, Jun 13, 2012 at 2:31 PM
Last Updated On: Tue, Jun 20, 2023 at 5:43 PM

Online URL: https://kb.datafile.co.uk/article/user-defined-reports-output-to-csv-320.html