Jump to content
Changes to the Jaspersoft community edition download ×

Could you explain me XML Data Source and Subreports example?


ftkjba

Recommended Posts

Hello all,

I want to create a report with a subreport with XML Data Source in Jaspersoft Studio. I was trying to copy example from the chapter XML Data Source and Subreports, but I have empty subreport area.
subreports examples nwork

Could you explain me my mistake?

The listing of the files is shown below:
xml_addressbook.jrxml

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                                                                                                                                                                                                                                                            [/code]

xml_addresses.jrxml

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                                        [/code]

complex_addressbook.xml

            Davolio      Nancy      davolio1@sf.net      davolio2@sf.net              Music        Sport                    Fuller      Andrew      af@test.net      afullera@fuller.org              Cinema        Sport                        Leverling      leverling@xyz.it              Peacock      Margaret      margaret@foo.org              Food        Books                        [/code]
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for the answer.
I have added isRemoveLineWhenBlank attribute into xml_addressbook.jrxml --> detail --> subreport --> reportElement and after that I got the folowing result:
subreports examples nwork2

I think the report does not pass the data into the subreport that is why subreport has nothing to display.

Link to comment
Share on other sites

Thank sanbez for the answer.
I have done what you wrote at office place, and got the right number of rows, but the hobby field is empty in each row. I created "JasperReports project" in Eclipse with the Jaspersoft Studio 6.4.0 plugin at home. I added files described in the question and I had got the worked fine example. When my holiday will be finished I'm going to understand the difference between home and office environment. Thanks for the help.

Link to comment
Share on other sites

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...