gombs Posted January 30, 2007 Share Posted January 30, 2007 High, I have an Subreport from an XML-Source, it works alone without problems. But when I insert this as a Subreport to an other Report I become this message: 1286293 [mv_atos_part subreport filler] WARN query.JRXPathQueryExecuter - The supplied org.w3c.dom.Document object is null. The Parentreport have the same XML-Source ( only an other XPATH Expression ) I have the option selected that the XPath expression from report should be used. What is going wrong? friendly greets to all other iReport-users Link to comment Share on other sites More sharing options...
walmillard Posted January 31, 2007 Share Posted January 31, 2007 there are 2 things you need to set when u add a subreport to a main. 1) the subreport connection expression. ie ((net.sf.jasperreports.engine.data.JRXmlDataSource) $P{REPORT_DATA_SOURCE}).dataSource("/Myxml/Data[Foo != '']") NOTE the Xpath, this needs to point at your data. 2) the subreport expression. ie "MySubreport.jasper" This is the name of the compiled jasper subreport. luckwalmillard Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 I use the wizard. to 1) The connection is the same like parentreport ( "$P{REPORT_CONNECTION}" ) . The XPath from subreport is "/root/ATOS/Measure". It is valid, because as alone report it works fine, only not as a subreport. To 2) The subreportexpression is valid to, i've selected from File-Browser and in all other cases it works.("mv_atos_part.jasper") I don't know whats the Problem.... :blush: Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 This is the XML-Data-Source: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><root><ATOS> <Atos-System-Typ>ATOS III Rev. 01</Atos-System-Typ> <SNR-Sensor>D 06 043</SNR-Sensor> <SN_ATOS_KameraLinks>181824506</SN_ATOS_KameraLinks> <SN_ATOS_KameraRechts>185524706</SN_ATOS_KameraRechts> <Measure id="1"> <Measuring_Volume>300x300</Measuring_Volume> <Lens_Focal_MeasuringVolume_atos_Projektiv>12mm</Lens_Focal_MeasuringVolume_atos_Projektiv> <Lens_Focal_MeasuringVolume_atos_ObjektivLinks>35mm</Lens_Focal_MeasuringVolume_atos_ObjektivLinks> </Measure> <Measure id="2"> <Measuring_Volume>150x150</Measuring_Volume> <Lens_Focal_MeasuringVolume_atos_Projektiv>23mm</Lens_Focal_MeasuringVolume_atos_Projektiv> <Lens_Focal_MeasuringVolume_atos_ObjektivLinks>65mm</Lens_Focal_MeasuringVolume_atos_ObjektivLinks> </Measure> <Profil>CFK 400</Profil> <Typ>ROT640</Typ> <Stativ_ATOS_Stativ>Foba AROBI</Stativ_ATOS_Stativ> <High_ATOS_Stativ>2,0m</High_ATOS_Stativ> <Arm0_ATOS_Stativ>1,7m</Arm0_ATOS_Stativ> <Arm1_ATOS_Stativ>1,0m</Arm1_ATOS_Stativ></ATOS> Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 Post edited by: gombs, at: 2007/01/31 07:06 if I used the connection expression like this the subreport will empty too, but there are no message like my first post ((net.sf.jasperreports.engine.data.JRXmlDataSource) $P{REPORT_DATA_SOURCE}).dataSource("/users//templates/test.xml") help plz :(Post edited by: gombs, at: 2007/01/31 07:13 Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 I post the files , first subreport: [file name=mv_atos_part.jrxml size=4715]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/mv_atos_part.jrxml[/file]Post edited by: gombs, at: 2007/01/31 11:44 Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 the parentreport: [file name=atos_xml.jrxml size=19058]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/atos_xml.jrxml[/file] Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 and the datasource... [file name=test.xml size=1156]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/test.xml[/file] Link to comment Share on other sites More sharing options...
gombs Posted January 31, 2007 Author Share Posted January 31, 2007 and the datasource... [file name=test-f1d0bd306c95c6992569042ea55f9bb4.xml size=1156]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/test-f1d0bd306c95c6992569042ea55f9bb4.xml[/file] Link to comment Share on other sites More sharing options...
gombs Posted February 1, 2007 Author Share Posted February 1, 2007 Maybe it is a general bug? I had create a simple report with a simple XML-file as datasource and a parentreport where this report was insert and there was the same problem...the parentreport use the same data source, too:S Link to comment Share on other sites More sharing options...
gombs Posted February 2, 2007 Author Share Posted February 2, 2007 I think it is a generally JR problem, I've tested to fill in a java-app and get the same error. Nobody has the same problem? Link to comment Share on other sites More sharing options...
fero2 Posted February 6, 2007 Share Posted February 6, 2007 Hi, I have the same problem. But I am curious if somebody have the solution. Link to comment Share on other sites More sharing options...
fero2 Posted February 6, 2007 Share Posted February 6, 2007 I solved it. In subreport properties. U need to choose "Use data source expression". And then put inside $P{REPORT_DATA_SOURCE} or what ever u want. When u choose "Use connection expression" it is not working. Link to comment Share on other sites More sharing options...
gombs Posted February 6, 2007 Author Share Posted February 6, 2007 Hi, I became a solution from iReport Master: a Expression like this: ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/root/Measure")) will work, too B) Link to comment Share on other sites More sharing options...
gombs Posted February 7, 2007 Author Share Posted February 7, 2007 Ok in iReport it works fine.But in a java app I get following error: Error evaluating expression : Source text : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/root/ARGUS") What is wrong? Link to comment Share on other sites More sharing options...
andreas.daab Posted May 15, 2007 Share Posted May 15, 2007 Could you please post your jasper report file? 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