ashoke_sati Posted June 2, 2010 Share Posted June 2, 2010 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? ThanksAshok Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted June 3, 2010 Share Posted June 3, 2010 Can you tell us what's the error you see in the console view? Giulio Link to comment Share on other sites More sharing options...
ashoke_sati Posted June 3, 2010 Author Share Posted June 3, 2010 Hi GiulioI 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. ThanksAshoke Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted June 4, 2010 Share Posted June 4, 2010 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 More sharing options...
ashoke_sati Posted June 4, 2010 Author Share Posted June 4, 2010 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 More sharing options...
Giulio Toffoli Posted June 4, 2010 Share Posted June 4, 2010 What do you print in the master? A connection is not passed to the report if not even used by the report.Giulio Link to comment Share on other sites More sharing options...
ashoke_sati Posted June 4, 2010 Author Share Posted June 4, 2010 Thanks ! As pointed connection was the issue. Link to comment Share on other sites More sharing options...
teodanciu Posted December 30, 2010 Share Posted December 30, 2010 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 More sharing options...
botnoe Posted November 28, 2011 Share Posted November 28, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now