Jump to content
Changes to the Jaspersoft community edition download ×

Table Component


ashoke_sati

Recommended Posts

Hi,

 

The table component just does not seem to work or is it too complicated to use. I follow all the steps i.e I chose the option of creating table from a dataset, I select the fields shown by the dataset, for the connection I use the option Use the same connection used to fill the master report and I chose the style presented. 

When I preview the screen keeps on returning to the design tab and does nothing ..i.e no data is displayed.

 

Am I doing something wrong?

 

Thanks

Ashok 

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Hi Giulio

I get no error but no data is being displayed , it just shows me the title of the report. I have attached the jrxml file. I am new to Jasper Report , however I tried everything but could not get the table component to display data.

 

Thanks

Ashoke

Link to comment
Share on other sites

 

Ok, I suspect the most common error in this case is that you correctly defined the table, you correctly defined the dataset, but you have not correctly defined the dataset run, which is how the table will use the dataset.

Right click the table and click on edit dataset run. Here you have to specify the connection and the way the dataset is filled.

Giulio

Link to comment
Share on other sites

Thanks for the Feedback, I have specified $P{REPORT_CONNECTION} as the connection, but  no data Is displayed by the report. Do I have to specify something in the Parameter and Parameters map exp tabs also.

Can we have a tutorial on this component.

 

Ashoke

 

Link to comment
Share on other sites

  • 6 months later...

 Is the same valid for $P{REPORT_DATASOURCE} ? I am having the same problem...no data is displayed, only a horizontal line. 

I defined a subdataset with corresponding fields, and trying to use this subdataset in a table (with  <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>) 

 

Is it necessary to use the $P{REPORT_DATASOURCE} in the master before passing it to the table? 

 

Thanks!

 

 

Link to comment
Share on other sites

  • 10 months later...

Hi,

I did the same approach.  I specified $P{REPORT_CONNECTION} in the dataset run and place the field of the dataset in the main report but i'm having the following error:

Error filling print... com.mysql.jdbc.JDBC4Connection cannot be cast to net.sf.jasperreports.engine.JRDataSource
java.lang.ClassCastException: com.mysql.jdbc.JDBC4Connection cannot be cast to net.sf.jasperreports.engine.JRDataSource 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:356) 
    at net.sf.jasperreports.components.table.fill.FillTableSubreport.evaluateSubreport(FillTableSubreport.java:95) 
    at net.sf.jasperreports.components.table.fill.FillTable.evaluate(FillTable.java:102) 
    at net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:88) 
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) 
    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:473) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2021) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:755) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:265) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:836) 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746) 
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58) 
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) 
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) 
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:879) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 
Print not filled. Try to use an EmptyDataSource...

I've attached the sample report.

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