cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting Crystal report to csv

former_member1012208
Participant
0 Kudos

I have created a crystal report (Crystal 2008) that accesses an Oracle database. In the detail section I supress some records based on certain criteria. Now my problem is, when I export this into a csv report, I see lot of empty lines in it. If I remove the surpress in detail section and export it, I don't get any blank lines. So I think the blanks lines have something to do with the surpress command. Could any one let me know how to remove the blank lines from the csv file when exporting the report?

Any help is greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Don,

As you have discovered there are generic formatting and other generic options when exporting to text file types. Will will not change the way they work because they have been like this for so long it would break a lot of users who expect the export layout to be as it is.

If you are going to create reports for exporting to those types create one specific for exporting. In other words get just the data you want from the DB, filter it server side etc. Then layout the report in a generic format and so it is optimized for CSV.

You may also want to alter your plans and rather than using CR to generate a data source for some other use is to use the database export options, most have it through their Tools, but if not then there are other tools for use with direct access to databases with export options.

I believe CSV defaults to open in Excel so export using Excel or if you are using this to create an ODBC datasource there are other options for that also.

I don't recall if I ever asked why you are using CSV?

Thank you

Don

former_member1012208
Participant
0 Kudos

Thanks for the reply. I did try to get only the required results from the DB with a query, but wasn't successful. That's why I am filtering them within Crystal.

I originally wanted to export the results to text file, but due to a bug / limitation in Crystal I am unable to do so. When exporting to txt, pdf or word Crystal exports only what I see on screen.

Ex: If I have close to 20 fields to display and could see only 8 and half on the screen, Crystal exports only 8 1/2 fields to txt, pdf or word. Only workaround is to export them into csv , excel or ODBC. So now I export to csv and then rename the file to .txt

This is the reason for selecting csv in this case.

0 Kudos

Hi Don,

Ah that helps... Crystal is WYSIWYG so if you don't see it on the screen you don't get the data. CR uses the Printer and Video settings to set the page/screen info. So if you set the zoom to 50% any fields outside are ignored, sort of...

Create a printer say 21" wide and then use that as your default and then export. You should get all of the data, if not adjust your paper size. Be sure to use a Printer that does support large paper sizes like a HP Plotter.

Thank you

Don

former_member1012208
Participant
0 Kudos

Thanks for the reply. Yes, creating printer that wide helps, but I don't know whether the information is going to be within this length all the time. So it is not a permanent solution for me.

0 Kudos

Hi Don,

It's your only option if you must use CR as explained in my last post. Creating a paper size that will handle all of your data is your only option.

Thanks again

Don

Answers (0)