vyankateshh Posted December 1, 2023 Share Posted December 1, 2023 So i have two xml file one contains parameters and another contains table data i am able to work with parameter and get that data from xml but i have issue with table data i tries using JRBeanCollectionDataSource and trying to use JRDataSource what i am basically trying to do is mapping for parameters i dont know about table. Can anyone help me with steps or anything that can be helpfull. Thanks for the help. Link to comment Share on other sites More sharing options...
vyankateshh Posted December 4, 2023 Author Share Posted December 4, 2023 Hello , i have two xml file i have to fill my jasper report with the data in the xml . one of the xml file contains parameter data and another contains table data with the help of that i need to feel the jrxml . i have used jrdatasource and jrbeancollectiondatasource but the result is still when i generate pdf . Can you also let me know how can i create innertable and outertable in jrxml Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted December 4, 2023 Share Posted December 4, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted December 11, 2023 Share Posted December 11, 2023 Thank you for your patience, we have not forgotten you. We need a little more time with our team of experts to come up with a solution. We will respond with an answer as quickly as we can. Link to comment Share on other sites More sharing options...
Tirupathi Mangalarapu Posted December 12, 2023 Share Posted December 12, 2023 Hello There, I've read your requirements but am still not clear on what you are trying to accomplish. Do you mind sharing screenshots of your data sets(Main and sub-datasets and mention if they are related or not) and the desired output? Are you trying to pass parameters from the first data set into to filter the second data set? Provide the info so we can better guide you. Thank you Link to comment Share on other sites More sharing options...
vyankateshh Posted December 13, 2023 Author Share Posted December 13, 2023 Basically i have two xml file one xml containing all the parameters data File 1 <parameter> <key>City</key> <value>ST. Paul</value> </parameter> <parameter> <key>Name</key> <value>Raj Qureshi </value> </parameter> <parameter> <key>State</key> <value>MN</value> </parameter> <parameter> <key>StreetName</key> <value>160 Kellogg Blvd E</value> </parameter> File 2 2nd xml contains nested data <table> <tableName>Results</tableName> <row> <column> <columnName>_ID</columnName> <columnValue>5232</columnValue> </column> <column> <columnName>Name</columnName> <columnValue>Raj Qureshi</columnValue> </column> <innerTable> <tableName>ProgramDecisions</tableName> <row> <column> <columnName>_ID</columnName> <columnValue>PT26355</columnValue> </column> <column> <columnName>Age </columnName> <columnValue>12</columnValue> </column> </row> </innerTable> <row> <row> Structure same as above </row> </table> So I am able to access data from 1st xml(parameters) but not able to get the data from 2nd xml I tried using Xpath but still data result is null in table after generating pdf . **requirements- 1)To get data from xml to populate table using 2nd xml. 2)Basic java code for using both xml at the same time (if possible). 3)Steps or idea to use both dataset(xml ) in jasper studio at the same time **Acutal result- **Expected result- Link to comment Share on other sites More sharing options...
Tirupathi Mangalarapu Posted December 13, 2023 Share Posted December 13, 2023 Hello Venkatesh, The data is not in the valid xml format for the second data set. It should be a valid XML path for using an Xpath for your xml file( It's in a table format). Anytime check your XML is in the right format or not here: https://www.xmlvalidation.com/index.php?id=1&L=0 Thank you 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