sas_jr Posted March 13, 2014 Share Posted March 13, 2014 I just start using jasperStudio not for long. I able to create jasper report from XML Datasource and XML Remote DataSource. But my problem is I have no idea how can i make XML , XML Remote Datasource available on my Jasper Server. I'm looking for answer almost 3 day.My Admin already make server able to upload XML file but some how it not see as data source but it just XML file. I need help how can i make Data source in Jasper Server for XML , XML Remote. I need to use bothDo i need install anything or server ? or put any code in my jasper studio Please help. Thank you in advance :(This keep my work stuck for 2 day already. Link to comment Share on other sites More sharing options...
Solution ybablyuk Posted March 13, 2014 Solution Share Posted March 13, 2014 Hello,You need create data adapter in jasperserver repository.You can found example in folder: /organizations/organization_1/reports/interactiveCustomers Report used Customers Data Adapter.in Report JRXML we need add property:<property name="net.sf.jasperreports.data.adapter" value="repo:/reports/interactive/CustomersDataAdapter"/>[/code]CustomersDataAdapter it's xml file with next content: <?xml version="1.0" encoding="UTF-8"?><remoteXmlDataAdapter class="net.sf.jasperreports.data.xml.RemoteXmlDataAdapterImpl"> <name>northwind</name> <fileName>repo:/reports/interactive/CustomersData</fileName> <useConnection>true</useConnection> <datePattern>yyyy-MM-dd</datePattern> <numberPattern>#,##0.##</numberPattern> <locale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:java.lang.String">en</locale></remoteXmlDataAdapter>[/code]<fileName>repo:/reports/interactive/CustomersData</fileName> - it's path to XML file in jasperserver repository, can be remoute XML file/reports/interactive/CustomersData - it's XML file taht can be uploaded to Jasperserver repository Link to comment Share on other sites More sharing options...
sas_jr Posted March 14, 2014 Author Share Posted March 14, 2014 I follow ur step carefully. I create folder name service in my repository and all the file is together at service. I upload the Data , Adapter in XML and upload report from jasper studio choose "Don't use any datasource" . (I wonder why my XML in server is just only file) here is my .xml dataadapter it name testadapter.xml<?xml version="1.0" encoding="UTF-8"?><remoteXmlDataAdapter class="net.sf.jasperreports.data.xml.RemoteXmlDataAdapterImpl"><name>test</name><fileName>repo:/service/test.xml</fileName><useConnection>true</useConnection><locale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:java.lang.String">en</locale></remoteXmlDataAdapter>and here is my data. I upload it to Server it name test.xml<?xml version="1.0" encoding="UTF-8"><entry><id>1</id><name>Nuttapat Vimolratana</name><password>1234567</password><position>yabai</position></entry>I also add following to my JRXML <property name="net.sf.jasperreports.data.adapter" value="repo:/service/testadapter.xml"/>but i got the error Failed to parse the xml documentOh i use jasperstudio by The wayThank you so much for your guide but i'm really new to this program and my programing skill not that goodBut your answer look like it for XML datasource that we upload to server. Can you explain about XML remote too ? I also attach my report and data for you. I don't know where did i do it wrongthank you sir Link to comment Share on other sites More sharing options...
sas_jr Posted March 14, 2014 Author Share Posted March 14, 2014 ------------------------------- Link to comment Share on other sites More sharing options...
sas_jr Posted March 14, 2014 Author Share Posted March 14, 2014 1. Now i can use local XML in server to generate report. Thank you so much for ur help. 2. But I'm still Blank with Remote XML Datasource i mean I send XML data from my server (Other server not jasper server) it can list in the jasper studio. But I'm still not found the way to link it to server when I want to generate report in Server. This is my main work (So could you please help explain) Thnak you so much Link to comment Share on other sites More sharing options...
ybablyuk Posted March 14, 2014 Share Posted March 14, 2014 For use Remote XML Datasource you need just put in fileName url adress like this:<fileName>http://community.jaspersoft.com/sites/default/files/answers/test_0.xml</fileName> Link to comment Share on other sites More sharing options...
sas_jr Posted March 17, 2014 Author Share Posted March 17, 2014 Thank you sir. Link to comment Share on other sites More sharing options...
sas_jr Posted March 18, 2014 Author Share Posted March 18, 2014 Thank you sir Link to comment Share on other sites More sharing options...
anton.derevshchuk Posted July 17, 2015 Share Posted July 17, 2015 I still have no data in my report also i got this in log: 2015-07-17 13:05:04,539 DEBUG JRFillDataset,pool-5-thread-14:746 - No fill position present, not using the data cache 2015-07-17 13:05:04,688 DEBUG BaseReportFiller,pool-5-thread-14:146 - Fill 1: created for testevent 2015-07-17 13:05:04,688 DEBUG BaseReportFiller,pool-5-thread-14:185 - created delayed actions 1 for filler 1 2015-07-17 13:05:04,690 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: BACKGROUND} for band 1323385305 2015-07-17 13:05:04,690 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: TITLE} for band 1659354852 2015-07-17 13:05:04,690 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: PAGE_HEADER} for band 1248443217 2015-07-17 13:05:04,691 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: COLUMN_HEADER} for band 1690179789 2015-07-17 13:05:04,691 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: DETAIL} for band 746515631 2015-07-17 13:05:04,691 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: COLUMN_FOOTER} for band 1901346662 2015-07-17 13:05:04,692 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: PAGE_FOOTER} for band 311301247 2015-07-17 13:05:04,692 DEBUG JRFillBand,pool-5-thread-14:154 - Origin {reportName: null, groupName: null,bandType: SUMMARY} for band 84075318 2015-07-17 13:05:04,692 DEBUG JRVerticalFiller,pool-5-thread-14:108 - Filler 1 - pageHeight: 842, columnFooterOffsetY: 723, lastPageColumnFooterOffsetY: 777 2015-07-17 13:05:04,693 DEBUG JRBaseFiller,pool-5-thread-14:488 - Fill 1: filling report 2015-07-17 13:05:04,693 DEBUG BaseReportFiller,pool-5-thread-14:336 - Fill 1: using virtualizer net.sf.jasperreports.engine.fill.JRFileVirtualizer@73e4766a 2015-07-17 13:05:04,693 DEBUG BaseReportFiller,pool-5-thread-14:351 - filler 1 created virtualization context net.sf.jasperreports.engine.fill.JRVirtualizationContext@798f3dca 2015-07-17 13:05:04,868 DEBUG JRFillDataset,pool-5-thread-14:1112 - Fill 1: Creating xpath2 query executer 2015-07-17 13:05:04,868 DEBUG JRXPathQueryExecuter,pool-5-thread-14:106 - XPath query: /report/events/row 2015-07-17 13:05:04,868 WARN JRXPathQueryExecuter,pool-5-thread-14:128 - No XML source was provided. 2015-07-17 13:05:04,869 DEBUG JRVerticalFiller,pool-5-thread-14:137 - Fill 1: no data 2015-07-17 13:05:04,869 DEBUG JRVerticalFiller,pool-5-thread-14:213 - Fill 1: no pages 2015-07-17 13:05:04,869 DEBUG JRBaseFiller,pool-5-thread-14:550 - Fill 1: ended 2015-07-17 13:05:04,869 DEBUG JRFillDataset,pool-5-thread-14:1193 - Fill 1: closing query executer 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