Link to home
Start Free TrialLog in
Avatar of TSWIT
TSWIT

asked on

How can I export a csv file from Crystal reports without the data suppressed in the detail showing blank commas?

the csv file looks like the below:

,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
"BMG4491W1001","MIDLAND HOLDINGS",0202161205,,"R",,"AD",,"2,261,840,000.00","ddenton@twinvest.com",,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
"KYG0420V1068","AMVIG HOLDINGS LTDCOM",0202161205,,"R",,"AD",,"2,907,920,000.00","ddenton@twinvest.com",,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
Avatar of Mike McCracken
Mike McCracken

I believe you will need to change the selection filter so only the records you want will be in the report.

mlmcc
Is it a true CSV file that has a header line?  If so, please post the header.  Otherwise, tell us.
ASKER CERTIFIED SOLUTION
Avatar of Bob McCoy
Bob McCoy
Flag of United States of America image

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
Avatar of TSWIT

ASKER

Bob McCoy,

That worked perfectly!  My .csv file does have an actual header and it worked great.

Thank you for your response and expertise.

King regards
Debbie
Thanks. Glad that worked for you.
Avatar of TSWIT

ASKER

Hi Bob,
In testing, I discovered that after running this script a few time successfully, I get the following:
At C:\csv\SCTClean.ps1:5 char:2
+ + C:\
+  ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:5 char:3
+ + C:\
+   ~~~
Unexpected token 'C:\' in expression or statement.
At C:\csv\SCTClean.ps1:6 char:2
+ + ~~~
+  ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:6 char:3
+ + ~~~
+   ~~~
Unexpected token '~~~' in expression or statement.
At C:\csv\SCTClean.ps1:7 char:6
+     + CategoryInfo          : ObjectNotFound: (C:\:String) [], CommandNotFound
+      ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:7 char:7
+     + CategoryInfo          : ObjectNotFound: (C:\:String) [], CommandNotFound
+       ~~~~~~~~~~~~
Unexpected token 'CategoryInfo' in expression or statement.
At C:\csv\SCTClean.ps1:9 char:6
+     + FullyQualifiedErrorId : CommandNotFoundException
+      ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:9 char:7
+     + FullyQualifiedErrorId : CommandNotFoundException
+       ~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'FullyQualifiedErrorId' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpressionAfterOperator
 
Any idea?
Can you post your script?  I don't have any unary operators in my script.