Print to CSV file
Hi,
If I print to CSV file, I don't want the text to be in quotes
i.e.:
I want this: 1111111,GCI London,London,123456,999
but I get this: 1111111,"GCI London","London", 123456,999
The report only has a details section. In the layout design, I selected
File->"Print to File Setup..." and selected "Comma Delimited". Selected
the Detail band and selected the order of the fields.
Any ideas on how I can get rid of the quotes around text fields...?
I use Delphi 5 (Ent) with RBuilder 6.03
Regards,
- Graeme -
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
If I print to CSV file, I don't want the text to be in quotes
i.e.:
I want this: 1111111,GCI London,London,123456,999
but I get this: 1111111,"GCI London","London", 123456,999
The report only has a details section. In the layout design, I selected
File->"Print to File Setup..." and selected "Comma Delimited". Selected
the Detail band and selected the order of the fields.
Any ideas on how I can get rid of the quotes around text fields...?
I use Delphi 5 (Ent) with RBuilder 6.03
Regards,
- Graeme -
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
This discussion has been closed.
Comments
For future reference, please do not post to the newsgroups and to
support@digital-metaphors.com. Thank you
When the TextFileType is ftComman, quotes will be added around the string if
it contains a comman or a space. Therefore GCI London will appear as "GCI
London". However, something like London will not have quotes around it. This
is consistent with most definitions of comma-delimited format.
Options for customizing this behavior:
1. Modify the source code. The source to TppTextFileDevice is contained in
unit ppFileDev.pas. The method TppTextFileDevice.SavePageToFile contains the
following line of code:
if (FTextFileType = ftComma) and ((Pos(',', lsText) <> 0) or
(Pos(#32, lsText) <> 0)) then
lsText := '"' + lsText + '"';
2. The architecture is open to created custom export device classes. You can
copy the existing TextFileDevice and use it as a starting point for creating
your own custom TmyTextFileDevice.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com