Hi,
I used the code below for a CSV file from an earlier post made. It works really well, but was hoping someone could help me define some customizations to it.
define(&s, string, '')
define(&sLine, string, '')
&s := &str + ','
&sLine := ''
search(&s, ',')
&sLine := &sLine + &s + left(' ', 50 - length(&s))
endsearch()
if(&sCurName = '')
&sCurName := mid(&sLine, 1, 10)
else()
if(mid(&sLine, 1, 10) <> &sCurName)
doform()
clearpage()
&sCurName := mid(&sLine, 1, 10)
endif()
endif()
set(¤t.line,¤t.line + 1)
store(¤t.line,&sLine)
if(ge(¤t.line,¤t.lpp))
doform()
clearpage()
endif()
Instead of putting them in a line per record, I wanted them to have a line per field.
For example:
John, john@bla.com, book1
John, john@bla.com, book2
John, john@bla.com, book3
would display as:
John
john@bla.com
book1
John
john@bla.com
book2
John
john@bla.com
book3
And so on..
Hope that makes sense..
Cheers
William