Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting 1 column of CSV data

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
0
0
GB
I am using CR XI

I need to export header and detail in one CSV column of data

eg header a,b,c,d
detail 1,2,3,4
4,5,7,2
4,8,7,9

When I export to CSV in puts information in 2 columns

a,b,c,d | 1,2,3,4
a,b,c,d | 4,5,7,2

etc
How can I overcome this please, Presume I have to put all in one formula somehow? I have looked through the history of threads and there is one mention of stting up a bolean variable to do this but it doesnt show how. Another mentions touching the registry but this is a no no for me
Urgent help required, thanks
 
Please don't post multiple threads on the same topic.

-LB
 
No problem was just desperate for a solution and still nobody can answer me. Has anyone any ideas please?
 
The way I have worked around this issue in the past is to export to Excel instead of CSV then export from Excel to CSV. Couple of extra steps outside of Crystal but it will work.

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Thanks its an idea I will bear in mind. Can anybody else help with a one stop solution please? Any technical users up for a challenge?
 
There is no easy way, spring guys is the best.

However, you can try Record Style with spaces.

You can then open this and select space as your delimiter. You can already guess the problem with this one!!

Any spaces or nulls in your data set will cause problems, also the headers are lost too.

Ian
 
Generally if using CSV you will be importing into a known data structure, ie the headers will be predefined. YOu could of course suppress your headers and then export to CSV and you will have data you need.

Ian
 
Infoview scedule csv format

It there any possible way to scedule crystal report in invoview with csv format? Please help
 
Hi Everyone,
Thank you for responding to this post, but if you're running a report that is automated to export to a CSV file (format: Character Separated), I only need a single header. I do not want to have to manually touch this file in order to to get the header line in there. Does anyone have any other ideas?
Thank you,
Glenn
 
ok I experimented with a few things and found a way to do this because I am convinced you can do ANYTHING in Crystal as long as you are creative enough ;)

OK here goes
I only did this for one field in the report but multiple formulas for the other required fields will do the trick.
OK Now let me see if I can explain. The following is the formula I used and placed in the details section of my report.

//This first line will be your column header:
if recordnumber =1 then "Attorney Name"
//
//// The next four lines will create a field with the last two records separated by a linefeed. when exported to CSV they will be on separate rows just like you want:
else if recordnumber =Count ({Attorney_Master.Last_Name}) then previous({Attorney_Master.Last_Name})
& chr(10)&
{Attorney_Master.Last_Name}
//The last line will print all the records between the first and the last two
else
previous({Attorney_Master.Last_Name})


Let me know if this does the trick.



_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
scratch that for a minute.. the last record doesn't come out correctly

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Im sure wishing I could delete a post ;)

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top