[#6916] - Subreport: DataSourceExpression (XML) marked as invalid

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

I have reports with xml-data adapter. The report contains a subreport.
Trying to put the following expression in the Data Source Expression
((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("//SenderData/SenderPosition")
throws an error in the expression editor that says:
Current expression is not valid. Please verify it!

I can save the report definition and it works at the runtime (that means: the report with subreport is printed correctly).
So I think this is an error in Jaspersoft Studio.

(by the way:
If I write the call without parentheses arround the typecast:
(net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}.subDataSource("//SenderData/SenderPosition")
the expression is valid in Jaspersoft Studio but this will throw an exception at runtime.
)

v6.1
andreas.milster's picture
Joined: Jul 15 2015 - 3:45am
Last seen: 5 years 5 months ago
Feedback