You are not logged in.
Pages: 1
Hi,
I am trying to execute a query within an each-statement, using a parameter of from the data of the current loop.
Unfortunately nothing happens: no error, no data.
Should this work with the ReportServer jxls parser? (JXLS 2, JXLS Report)
Are there any hints on what needs to be done for this to work?
regards
Steffen
Offline
do not include quotes within the query
Offline
Hi sritter,
can you please post a minimal example of what you are trying to achieve?
Regards,
Eduardo
Offline
I want to iterate over an entity like employees or locations and fill them in row by row (works). For each of those created rows I want retrieve an additional result set (does not work): monthly performance (returning 12) which I want to add column by column. Or in JXLS speach an jx:each direction=right within the area of an jx:each direction=down. Therefore, the identifier of the first iteration would be a parameter to the second iteration.
But I cannot get the inner iteration to be executed even without parameter.
So basically the "dependent query" sample from v1 http://jxls.sourceforge.net/1.x/samples … ample.html in v2 syntax.
Offline
Hi sritter,
does this work with JXLS2 (without reportserver) ? Do you have the corresponding JXLS2 syntax for the JXLS1 syntax you mention ?
Regards,
Eduardo
Offline
does this work with JXLS2 (without reportserver)?
I don't know
Do you have the corresponding JXLS2 syntax for the JXLS1 syntax you mention ?
Yes, well the only difference between the normal grouping sample and the dependent query is, that the inner each assigns another jdbc.query to items, instead of _group.items.
Offline
Hi sritter,
Dependent Queries are working in my testcase:
jx:area(lastCell="B3")
jx:each(items="jdbc.query('select OR_CUSTOMERNUMBER as customernr FROM T_AGG_ORDER')" var="order" lastCell="B3")
${order.customernr}
jx:each(items="jdbc.query('select CUS_CUSTOMERNAME name, CUS_PHONE phone FROM T_AGG_CUSTOMER where CUS_CUSTOMERNUMBER = ' +order.customernr )" var="customer" lastCell="B3")
${customer.name}
tested with the ReportServer Demo data.
Regards,
Eduardo
Offline
OK, works, if I include the parameters with ' + + ' instead of ? and additional options to jdbc.query.
Offline
OK, works, if I include the parameters with ' + + ' instead of ? and additional options to jdbc.query.
I didn't get this. What did you replace with + + ? and how does it work now in your case ?
Regards,
Eduardo
Offline
"jdbc.query('select CUS_CUSTOMERNAME name, CUS_PHONE phone FROM T_AGG_CUSTOMER where CUS_CUSTOMERNUMBER = ' +order.customernr )"
instead of
"jdbc.query('select CUS_CUSTOMERNAME name, CUS_PHONE phone FROM T_AGG_CUSTOMER where CUS_CUSTOMERNUMBER = ?', order.customernr)"
Offline
Hi sritter,
this seems not to work with the "?" syntax, this is correct. I raised RS-4284. I think this is not yet supported in JXLS2 or it is a bug. In the meanwhile, please use the "+" syntax.
Regards,
Eduardo
Offline
Pages: 1