swarm357 Posted March 19, 2013 Share Posted March 19, 2013 Hey all,Im working on a MacBook Pro with Mountain Lion and the 5.0.1 version of Jaspersoft iReport Designer .... i have tried to work around this on my pc as well with the same result (iReport 5.0.1 as well on pc)I have read through many other questions/answers in the answer section and im rather stumped with my current issue. I have a master report (Standard Report 1) that i am adding a subreport into. The subreport is valid/works when i preview it. In the master report I have set the subreport data source expression to:((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/page/view2/row")which i Know works b/c i used the exact same expression with a different valid string for the dataSource method in 7 other reports.Standard Report 2 subreport jrxml snippet - this is a report which is currently working $P{nullText}$P{chartThreeName}$P{chartOneName}$P{chartTwoName}$P{nullText}((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/page/view1/row")$P{SUBREPORT_DIR} + "standard_report_2_chart_subreport_dev.jasper"Here is the snippet of my Standard Report 1 - which is Not working ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/page/view2/row") $P{SUBREPORT_DIR} + "standard_report_1_subreport_dev.jasper" note that the dataSourceExpressions are EXACTLY the same minus the slightly different string in the dataSource method However, when i try to run the master report (Standard Report 1) i see the following:Error filling print... Error evaluating expression : Source text : ''net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource'"/page/view2/row") net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ''net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource'"/page/view2/row") at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:203) .... etc ....my question is why are my leading parentheses being, apparently, converted to single quote characters ?????Has anyone else run into this issue? Or found a solution/workaround?Thanks for you help in advance! Link to comment Share on other sites More sharing options...
swarm357 Posted March 19, 2013 Author Share Posted March 19, 2013 the jrxml from my example is being cut out for some reason ... not sure why :( Link to comment Share on other sites More sharing options...
swarm357 Posted March 20, 2013 Author Share Posted March 20, 2013 I have discovered that when i make a new report master report from scratch and add the subreport then my new master report works just as it should. What might be causing an already existing (complex) report to not accept an addition of a component that requires a data source expression value? i just ran into this same issue when i tried to change the data source for some charts in the summary section of my master report. I was trying to have them use a new sub dataset which contains the exact same fields as the master dataset. 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