Jump to content
JasperReports Library 7.0 is now available ×

CSV DataSource


2005 IR Help

Recommended Posts

By: kamgra01 - kammeradgranato

CSV DataSource

2004-10-07 13:53

Problem with the Custom DataSource

I read the tutorial: 4.4 Implementing a new custom datasource and tried to run this tutorial on my computer.

I design the .jrxml or xml file with iReport

I put the .jasper, .jrxml and test.csv on the same folder an the CSVDatasourceTestFactory.java, ,JRCSVDataSource.java .class, in teh folder itbusinesslogicireportconnection.

Then I adapt the compiler directory.

Then selected the menu BUIL->compile all, then Built-> run with active connection(The connection test was successful).

The result is:

Compiling to file... C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource. -> C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourceuntitled_report_1.java

Errors compiling C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource.!

 

dori.jasper.engine.JRException: Report design not valid :

1. Field not found : COLUMN_3

2. Field not found : COLUMN_1

3. Field not found : COLUMN_2

at dori.jasper.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:111)

at dori.jasper.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:137)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:138)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:126)

at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:321)

at java.lang.Thread.run(Unknown Source)

 

Compilation running time : 31

Filling report...

pdfExporting Exporting pdf to file...

"C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource.pdf"

Running time : 297

Executing: C:ProgrammeAdobeAcrobat 5.0ReaderAcroRd32.exe C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource.pdf

Finished...

 

my test.csv:

COLUMN_1;COLUMN_2;COLUMN_3;

1Spalte1Zeile;2Spalte1Zeile;3Spalte1Zeile;

1Spalte2Zeile;2Spalte2Zeile;3Spalte2Zeile;

1Spalte3Zeile;2Spalte3Zeile;3Spalte3Zeile;

What is wrong?

 

 

 

 

By: HappyMan2005 - happyman2005

RE: CSV DataSource

2005-06-08 14:32

I have a same problem and I would like to know if any one have an answer to this problem. Thanks.....

 

Problem with the Custom DataSource

I read the tutorial: 4.4 Implementing a new custom datasource and tried to run this tutorial on my computer.

I design the .jrxml or xml file with iReport

I put the .jasper, .jrxml and test.csv on the same folder an the CSVDatasourceTestFactory.java, ,JRCSVDataSource.java .class, in teh folder itbusinesslogicireportconnection.

Then I adapt the compiler directory.

Then selected the menu BUIL->compile all, then Built-> run with active connection(The connection test was successful).

The result is:

Compiling to file... C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource. -> C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourceuntitled_report_1.java

Errors compiling C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource.!

 

dori.jasper.engine.JRException: Report design not valid :

1. Field not found : COLUMN_3

2. Field not found : COLUMN_1

3. Field not found : COLUMN_2

at dori.jasper.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:111)

at dori.jasper.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:137)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:138)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:126)

at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:321)

at java.lang.Thread.run(Unknown Source)

 

Compilation running time : 31

Filling report...

pdfExporting Exporting pdf to file...

"C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource.pdf"

Running time : 297

Executing: C:ProgrammeAdobeAcrobat 5.0ReaderAcroRd32.exe C:Dokumente und EinstellungenAAZIGE.ireportbspDataSourcemyDataSource.pdf

Finished...

 

my test.csv:

COLUMN_1;COLUMN_2;COLUMN_3;

1Spalte1Zeile;2Spalte1Zeile;3Spalte1Zeile;

1Spalte2Zeile;2Spalte2Zeile;3Spalte2Zeile;

1Spalte3Zeile;2Spalte3Zeile;3Spalte3Zeile;

What is wrong?

 

 

 

 

 

By: Giulio Toffoli - gt78

RE: CSV DataSource

2005-06-08 15:41

You have to define your fields inthe values dialog

 

Giulio

 

 

 

 

By: HappyMan2005 - happyman2005

RE: CSV DataSource

2005-06-09 10:52

Hi

Thank you for your help. But could you provide me with an example, So I can see what am I doing wrong. Because I have provide fields but how would it know COLUMN_1 vs COLUMN_2 vs COLUMN_3 and etc. Thanks for your time and response again.

 

 

 

 

By: Giulio Toffoli - gt78

RE: CSV DataSource

2005-06-10 02:28

 

Look inside CVSDataSource.java

 

Giulio

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...