Link to home
Start Free TrialLog in
Avatar of MOISDTech
MOISDTech

asked on

crystal reports adds header to front of each detail line in csv file

I am created a .csv data file with Crystal Reports.  It is a very simple file of employee information.  In the file, there is a report header that consists of a text box that I put the field names in, separated by commas.  In the details section, is the info for the records.  

This is what I want the file to look like:

First Name,Last Name,Start Date
John,Smith,5/15/2006
Roy,Jones,1/27/2002
Fred,Macker,3/18/1999

When I export the file to a .csv, this is what I get:

First Name,Last Name,Start Date,John,Smith,5/15/2006
First Name,Last Name,Start Date,Roy,Jones,1/27/2002
First Name,Last Name,Start Date,Fred,Macker,3/18/1999

When I export the file to a .xls or .txt file, the format is correct.  The header is listed once at the top of the file and the records then follow.

Any ideas why the .csv file is not working the same way?
Avatar of Mike McCracken
Mike McCracken

That is the way the CSV export is written.

There is an ooption in the CSV export to only print the headers once.

If you are exporting manually (from preview) check the options pop up and make sure that the ISOLATE PAGE HEADER and GROUP HEADER options are checked.

If you are using code then the same options should be available and set to TRUE

mlmcc
Avatar of MOISDTech

ASKER

Thank you for the reply, mlmcc.
I have attached 2 files to show what I am looking at.  I do not see the options you mention.  Am I not looking at the correct screen?
Thanks,
Roger

2010-03-31-1636.png
2010-03-31-1635.png
Yes.  I get a much different second one
CSVExport.doc
mlmcc,
Can you verify your version number for me?  I thought I had XI r2 on my system, but maybe it is just XI.  I do have XI r2 Server, but maybe my local install is just XI.
My version is 11.0.0.1282
Thanks,
Roger
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just checked that is either SP1 or SP2 for CR XI R1.
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/12986

mlmcc
Thanks for the help.  I was able to get the update and all is well.