srikotesh
asked on
How to pass the SHEET_NAMES dynamically for XLS in jasper reports
Hi Experts,
there are two approached to pass sheet names vaue
1st approach:
cant we pass this value as parameter in java?
this way(1st approach) i am unable to follow because i am sheduling report for a specificdate. and passing few parameter inputs as well for the same report.
sample:
2nd approach:
iam setting in the report properties like below(2nd approach): Property Name = "net.sf.jasperreports.expo rt.xls.she et.names.a ll"
Property Value = "first/second/third"
is there any chance to pass this property value as dynamic.?
I have tried like below as not works for me
there are two approached to pass sheet names vaue
1st approach:
JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter( JRXlsAbstractExporterParameter.SHEET_NAMES, new String[] {"first","second","third"} );
cant we pass this value as parameter in java?
this way(1st approach) i am unable to follow because i am sheduling report for a specificdate. and passing few parameter inputs as well for the same report.
sample:
Util.getParamString(stringBuilder, "GENERATEDON", Date);//similarly few more params i am passing
2nd approach:
iam setting in the report properties like below(2nd approach): Property Name = "net.sf.jasperreports.expo
Property Value = "first/second/third"
is there any chance to pass this property value as dynamic.?
I have tried like below as not works for me
<line>
<reportElement x="0" y="-1" width="1" height="1">
<propertyExpression name="net.sf.jasperreports.export.xls.sheet.name"><![CDATA[$F{course_name}]]></propertyExpression>
</reportElement>
</line>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.