I'm trying to generate a subreport inside a report with XML as data source. I have problems because I don't know how to get it.
Could anyone tell me how to do this? I don't see any documentation about subreports with XML as data source, and I'm quite newbie with eclilpse BIRT.
Does the sub report use the same xml as the master? Can you give some
more detail on what you need? For example do you have an outer dataset
that list ids and you want these ids passed to the subreports so they
only get xml for those ids.
On 10/6/2010 6:36 PM, Bea wrote:
> Hi all,
> I'm trying to generate a subreport inside a report with XML as data
> source. I have problems because I don't know how to get it. Could anyone
> tell me how to do this? I don't see any documentation about subreports
> with XML as data source, and I'm quite newbie with eclilpse BIRT.
> Thanks for your help,
> Best regards
I should have explained better. The xml is the same for the master and detail, although I have different data sets for each one. My expected result should be the following:
Each element has an id. What I want is to embed a table of concepts into its corresponding service (services is another table). Say that a service is the master and a concept the detail. I'd like to know what is the best way to link the concepts subreport to the service report, as with a JDBC data source is easy to create a query with a parameter in the where clause and then pass the parameter in the subreport, but with the xml as data source I can't accomplish it.
If your xml was slightly different you could use the xml data source
parameter feature described here: http://www.eclipse.org/birt/phoenix/project/notable2.5.php#j ump_10
It would require that your service id be an attribute not a node. If
you cant change it the best way to do this is to add the master table
for services and then create a dataset that retrieves all the concepts.
drag this dataset to a nested table. Add a filter to the table that
filters on the outer table's service id. I took your example xml and
pasted it to an xml file an wrote a small report off of it. Just change
the datasource xml file location and it should run.