inconsistencies between different data sources?

0

Hi JasperSoft,

Why are there so many inconsistencies between how different data connections/adapters/sources work?

for example XML data source vs json data source...

The examples included on install don't work the same for these data sources.

the json data source customer orders subreport scenario seems to require the parameter passed from master to sub 

                <subreportParameter name="net.sf.jasperreports.json.source">
                    <subreportParameterExpression><![CDATA["data/northwind.json"]]></subreportParameterExpression>
                </subreportParameter>

however the xml example doesn't have this parameter, relying instead of the configuration in the subreport itself.

This is fair enough, but if i remove the parameter from the json master report, it doesn't fall back on using the sub report datasource.

Have i misunderstood something, or is this expected behaviour?

Kind Regards

Martin

martin_48's picture
Joined: Jul 30 2019 - 3:35am
Last seen: 18 hours 47 min ago

Jasper Reports Ultimate Guide 3rd edition (maybe out of date) states...

" Subreports behave in the same way and expect to receive the same kind of input when
they are being filled. You can supply to your subreport either a data source using the
<dataSourceExpression> element or a JDBC connection for the engine to execute the
subreport’s internal SQL query using the <connectionExpression> element. These
two XML elements cannot both be present at the same time in a <subreport> element
declaration. This is because you cannot supply both a data source and a connection for
your subreport. You must decide on one of them and stick to it
"

Seems to imply the only data connection type that's supported is JDBC. What about XML, JSON, CSV etc? 

martin_48 - 3 weeks 6 days ago

0 Answers:

No answers yet
Feedback