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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to export mainreport and subreport to CSV

Status
Not open for further replies.

KriZ1977

Programmer
Feb 22, 2001
4
0
0
DK
I have a main report, which has all the details I need. I have also added and linked my main report to a sub report.

When I preview the report, all data is presented correctly including data from the sub-report field. But when I try to use the Export function (csv format) in Crystal, it only exports the fields in the main report. The field from the sub-report is ignored.

Please advise what I am missing in my report. I am using Crystal v6

/Best Regards,
Christian
 
Hi

I have solved the problem my self...

It is not possible to export subreports to csv.
CR is only able to export subreports to RTF, HTML, Word, Text, Excel, etc...

/Christian
 
I don't think you can do both to CSV.
One workaround is to export to TEXT. This requires that you put in the commas so that the report looks just like a CSV file before you export it. The easy way to do this is to put all of the fields in a single text object, with commas imbedded between them. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
What format are you exporting to?
What version of CR? Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
I have the same problem, but can't put all fields in a single text field as I am doing v. complicated mailing label, with loads of conditional suppression. If I move the fields, then the report won't work properly.

I would really appreciate any ideas whatsover. I need them in csv format as they need to go into excel to grab the column headings and then mail merge them in word. This is for a client so I have no say on this.

I have tried exporting them to excel, but they don't come out in columns, they come out as blocks of data.

I am using CR 8
Thanks in advance
 
Well,

The only thing which I think may help everyone, if you export the file to Excel (Which does sub-reports and main reports) and then create a macro in Excel, which saves your report as CSV - maybe do a batch or the like - if you wanted to go a step further, you could write the batch to act as a mailer/ftp/disk output device as well.

Without actually doing this myself, it should work. - Im about to try anyway :)

Regards
Michael Gray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top