How to get rid of quotation marks
I have a comma delimted text file but each field is offset with question
marks ... for example "customer","customer ID","address" etc. ... when I
use the ppTextPipeline and set the delimiter as a comma, the quotations show
up on the report ... I can get rid of them with code but I want my end users
to be able to do this ... is there a way to omit the quotes within the
textpipeline or report setup? thanks, LL
marks ... for example "customer","customer ID","address" etc. ... when I
use the ppTextPipeline and set the delimiter as a comma, the quotations show
up on the report ... I can get rid of them with code but I want my end users
to be able to do this ... is there a way to omit the quotes within the
textpipeline or report setup? thanks, LL
This discussion has been closed.
Comments
has been added as a property of the txt pipeline for the next release of RB.
{---------------------------------------------------------------------------
---}
{function TppFileDataStream.GetFieldAsString}
function TppFileDataStream.GetFieldAsString(aFieldName: String): String;
var
liIndex: Integer;
liResultLength: Integer;
begin
liIndex := GetFieldStringIndex(aFieldName);
if (liIndex >= 0) then
Result := FFieldStrings[liIndex]
else
Result := '';
{here is the new code}
if FRemoveSurrondingQuotes then
begin
liResultLength := Length(Result);
if (liResultLength > 1) then
begin
if (Result[1] = FQuoteChar) and (Result[liResultLength] =
FQuoteChar) then
Result := Copy(Result, 2, liResultLength-2);
end;
end;
end; {function, GetFieldAsString}
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com