Jump to content
Changes to the Jaspersoft community edition download ×

iReport 3.1.0 "csv" Datasource


runner1549

Recommended Posts

How can I get the below "csv" datasource
to work RowSeparator=NewLine instead of
RowSeparator=Space ?

  1. opened iReport
  2. created a new datasource
  3. File, New Empty Report (since ReportWizard fails on csv files)
  4. click "Connections/Datasources" ICON
       ** rightside of "Datasource" DropDown
       ** New, File CVS datasource, Next
       ** Name = "CVS File"
       ** CVS File = C:customers.csv
       ** click "Get columns name from first row"
       ** check "Skip the first line"
       ** click "Separators" TAB
            ** FieldSeparator=Comma
            ** RowSeparator=Space
                 ** file needs a space on the end of
                    each line since "RowSeparator=NewLine"
                    fails to work
       ** click "Test", "Connection Success" appears
       ** click "Save", then exit the screen
  5. Click "Report Query" ICON on the JRXML
  6. Click "CVS Datasource" TAB
  7. Click "Get Field from datasource" BUTTON, click "OK"
  8. Go to "Window/Report Inspector"
  9. Drag both "Fields" onto Report's DETAIL screen
 10. Click "Save", click "Preview"
 11. WORKS, report appears with correct values
 12. repeat same steps, but use customers_noSpace.csv
     and setup as "RowSeparator=NewLine"
 13. FAILS

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I'm not able to reproduce the problem. I'm using iReport 3.1.2. Most often bugs in this area are linked to Windows CR/LF vs Unix CR line separators. But I'm not aware of any bugs in iReport in this regard.

 

Can you post your CSV files to see if the problem can be reproduced with them?

 

Regards,
Matt

Link to comment
Share on other sites

Attached are the files:

FAILS = customers_noSpace.csv (without space) --> FieldSeparator=Comma, RowSeparator=NewLine

WORKS = customers.csv (with space) --> FieldSeparator=Comma, RowSeparator=Space

FAILS = customers.txt (fixed width) --> FieldSeparator=Space, RowSeparator=NewLine

Please let me know how to get customers_noSpace.csv & customers.txt working.



Post Edited by S L at 01/01/09 14:25
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...