[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.birt] Report parameters in XPath expressions

Hello,

I have the following example XML doc as a data source:

<companies>
	<company id="c1">
		<employee id="e1"/>
		<employee id="e2"/>
	</company>
	<company id="c2">
		<employee id="e1"/>
		<employee id="e2"/>
		<employee id="e3"/>
	</company>
</companies>

I have created a dynamic combo box report parameter called 'cid' of type string, populated from a simple /companies/company/@id dataset.
I am trying to create an 'employees' dataset with the following row mapping:


/companies/company[@id={?cid?}]/employee

the result is empty.

Other times i get unpredictable behavior, e.g. error:
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.3.1.v20080829
Error Code:odaconsumer.CannotPrepareStatement
Error Message:Failed to prepare the following query for the data set type org.eclipse.datatools.enablement.oda.xml.dataSet.
The filter definition is invalid.


Sometimes the error doesn't show up, but the row mapping field contents dissappear.


how do i insert a report parameter into an XPath expression in row mapping when creating a dataset from XML file?


Do i have to escape inverted commas?

Thanks
Sp