Anibal D. Posted April 5, 2023 Share Posted April 5, 2023 Hi All!I have a report where I'm already excluding some bands when I export to different formats. See code below: <property name="net.sf.jasperreports.export.csv.exclude.origin.band.1" value="title"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="pageFooter"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.3" value="summary"/> <property name="net.sf.jasperreports.export.html.exclude.origin.band.1" value="pageFooter"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="pageFooter"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="pageFooter"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="summary"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="summary"/>[/code]Things is, I have a table on this report which contains two groups. Then I need to exclude the groupHeader and groupFooter of this table when I export the report to CSV. I have tried different ways. Added the code below at the top of the report along with the other exclude properties. I have also moved these properties to the top of the table. The properties I'm using are the ones added below. Not sure if these are wrong or if I need to do anything else to be able to exclude this group H and F from CSV export. <componentElement> <reportElement key="" x="0" y="0" width="1090" height="119" uuid="02dc3f91-f82a-40d6-9fe2-5796a6efc2af"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> <property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/> <property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/> <property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.property_address_header" value="groupHeader"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.property_address_footer" value="groupFooter"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.group.property_address_header" value="property_address"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.group.property_address_footer" value="property_address"/>....[/code]I'll much appreciate any help here. cheers! Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted April 10, 2023 Share Posted April 10, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Anuja Vilas Bhujbal Posted April 11, 2023 Share Posted April 11, 2023 Hello Anibal,You will need to add a wild card property setting to reference the original header suppression into your report sub-element (table group headers).net.sf.jasperreports.export.{format}.exclude.origin.report.{arbitrary_name}=*For example, you will need to set the below properties in the report for the property_address_header - <property name="net.sf.jasperreports.export.csv.exclude.origin.band.property_address_header" value="groupHeader"/><property name="net.sf.jasperreports.export.csv.exclude.origin.group.property_address_header" value="property_address"/><property name="net.sf.jasperreports.export.csv.exclude.origin.report.property_address_header" value="*"/> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now