Home Devices

Delimited Ascii output question

edited April 2013 in Devices
We've got RBuilder 12.05 working with Delphi 2010 under Win7. Our
application has over 200 reports, which we've successfully implemented
with Print, PDF, RTF & HTML output. We've also implemented the
Delimited-Ascii option, which, as expected, exports the report's fields
into a delimited-ASCII textfile, readable by a spreadsheet, etc. It does
so echoing the report's as-designed format, which means that if a record
appears on more than one line, then that's how many lines are generated
in the output.

NOW, we have users asking us for the output all on one line. Is there
any kind of tool that could take (say) the TppPipeline fields for the
report and export each record as one line (ignoring the report design)?

We have several reports with grouping and/or many-to-one output per
primary record; and have been asked to export that as one
line-per-record as well. Any suggestions?

Lane Campbell
NW Software

Comments

  • edited April 2013
    Hi Lane,

    The TextFileDevice is not designed to output a single record per line.
    This is however a fairly simple device that outputs each line based on
    the BandSaveNo property of the drawcommand sent.

    See the TppTextFileDevice.SavePageToFile routine inside the ppFilDev.pas
    file for how this is currently done. You will see a large while loop
    controls whether the device moves to a new line or not.

    It would be possible to create your own text device starting with the
    current one, only altering this routine to meet your needs. Instead of
    all the processing to determine which line a drawcommand is outputted
    to, you would simply break to a new line each time. Then you would just
    need to alter the DeviceName and DeviceDescription and register it with
    the RB device architecture so your users can export their reports with it.

    ppRegisterDevice();

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.