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!

Comma Delimited from Crystal 11

Status
Not open for further replies.

Barock21

MIS
Dec 27, 2005
23
US
Guys, I currently am using Crystal 11 Professional. I am trying to export a very simple report to a comma delimited file. But when I opened up the report it is showing extra commas. Here's how the report look like:

Group Header 1 InvoiceNo InvoiceDate blankspace Cust ID
Detail CustPO BlankSpace ItemID

I supressed all other sections. 1 problem is that when I export this to comma delimited (.csv) straight from crystal the information will wrap. So CustID is not the end of the first row - rather CustPO is showing next to Cust ID and all other information from the detail section. Basically the end result should look like:

Inv123,092506,,12345
ABC,,ItemXXX
Inv456,092406,,13578
XYZ,,ItemYYY

and it is not. The ABC will go right after 12345, etc.
I then tried exporting it to excel first and then save it as comma delimited which seem to work. However, I found out that I'm getting extra commas because the number of columns on the odd rows don't match with the even row. Thus, by default it's adding another blank column on the even row.

Any ideas will be highly appreciated. Thanks.

DT
 
Some of us aren't guys, although I am, but I gently suggest you find another way of saying hello if you feel compelled as some may take exception to your being sexist, intended or otherwise.

Th biggest problem is that you don't understand what a comma delimited file is.

A comma delimited file produdes the exact same results in each row, and is generally produced using the output in a single section. It's conceivable that one might use multipl sections, just very unusual, and you'd need very specialized code to read the varying types of row lengths produced by it.

Move the fields from the Group Header down into the details section and you'll get a proper CSV output.

-k
 
Yep, it works. Perhaps you didn't then suppress the group header.

And I guess you think that saying doesn't work is somehow useful, it isn't.

-k
 
No it doesn't and yes I suppressed the group header.
When I moved the header down to the detail section - I got repeated invoice numbers for every single line item (which is expected). 1 invoice may have many line items.

Even if I had 1 line per invoice - it is still showing the even row right after the last column of the odd row.

I can modify it so it looks fine on the report but when I exported it, the result is still the same.
 
Even row right after the odd row, yep, sounds like solid math to me ;)

You may have some spacing issues, but people make CSV files constantly in Crystal, and it works precisely as described.

So you now know that the problem is specific to your design, so some basic discovery should isolate the problem.

Shrink the details all the way up, and make sure that all other section are suppressed except the report header, where you might keep the column labels, you haven't mentioned anything about those, you said all other sections are suppressed.

Now eliminate all fields except the first and try that, if it works, continue on, if ot does not, then you probably have something adding a carriage return or some such in a field or within the design of the report.

btw, you don't need a group if you're building CSV if you intend to show the line items, a CSV repeats values, it is the intent of that file design...

Rather than trying to describe ot use what a CSV is, as you're obviously just learning, try creating a new report and placing the fields in the details section one at a time, I fear that you've outsmarted yourself somewhere along the line in the design of this report.

-k
 
I believe that's the part you did not understand in this issue. What I have been trying to explain is that in this file as the end result I can not have the invoice number line repeated for each line item.

The invoice line will only show once and followed by the line items on the next rows and then the next invoice number and followed by the items on the next rows and so on and so forth.

I know you kept saying that that's how .csv works. Regardless, of what it is designed to do - I'm afraid it's not that simple and that is definitely not what my end user is looking for.
Believe me I've done my share of creating .csv through Crystal in the past and I didn't have any issues. I admit that this is a bit unique and may not be possible.

Btw, noone knows everything, otherwise there's absolutely no reason for a bulletin board like this.
 
Then it is not a Character Seperated File you seek.

Since you don't want it repeated, you should post what you expect it to look like.

When you placed all fields on the same line and then said it skips a line, it could be that you had things misaligned, etc, but the nature of a CSV is not to produce a header line and then several detail lines.

You might try the Text export to acieve that sort of structure.

My apologies for being hardnosed about this, you had stated that you were after a CSV, when in fact your are seeking a proprietary file structure with character speerted values, and now I'm not sure what you want, so please post an example of what it should look like (a few rows showing the group and details).

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top