Jump to content
We've recently updated our Privacy Statement, available here ×

exclude column header from sub report in csv


crazybugs

Recommended Posts

We used the below mentioned property in the master report to exclude the column header of the subreport in csv format. However this does not seem to work.

These are the properties set in the master report, to exclude the “columnHeader” band from the subreport “xxxx_subreport”.

 

<property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.mysubreport" value="columnHeader"/>

<property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.report.mysubreport" value="xxxx_subreport"/>

 Can anyone please confirm if we are missing out something here.



Post Edited by crazybugs at 11/23/2009 08:39



Post Edited by crazybugs at 11/23/2009 08:41
Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

This is not for excluding the column header. This is for keeping the first occurance of the column header in case it is excluded by the:

 

net.sf.jasperreports.export.csv.exclude.origin.band.mysubreport=columnHeader

net.sf.jasperreports.export.csv.exclude.origin.subreport.mysubreport=xxx_subreport

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

Thanks for the reply lucianc.

Using the above mentioned parameters I was able to exclude the column header from the subreport in csv.

but how will be able to keep first occurance of the column header in csv.



Post Edited by crazybugs at 12/01/2009 16:24



Post Edited by crazybugs at 12/03/2009 08:19
Link to comment
Share on other sites

I tried to keep the first occurence of column header in csv by using the below mentioned parameters but it didnt work out.

 

<property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.mysubreport" value="columnHeader"/>

 

<property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.report.mysubreport" value="xxxx_subreport"/>

 

 

Link to comment
Share on other sites

I was able to resolve the issue by following steps.

 

I used the following property in the master report.

 

<property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.mysubreport"

value="columnHeader"/>

 

<property

name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.report.mysubreport"

value="xxxxx_subreport"/>

 

I used the following property in my subreport(xxxxx_subreport).

 

<property

name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.columnHeader"

value="columnHeader"/>

 

 

Link to comment
Share on other sites

  • 5 years later...

I have tried using this same format for excluding a table component column header and it did not seem to work do you know if this same style can be applied to tables? This is what I tried with no success, detailTable is the key I gave to my table.

    <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.detailTable" value="columnHeader"/>
    <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.report.detailTable" value="detailTable__Table"/>

and this is the report element in the component band.

    <summary>
        <band height="200" splitType="Stretch">
            <componentElement>
                <reportElement key="detailTable" x="0" y="0" width="1280" height="80" uuid="529206a5-b4a2-4715-8985-ff01b9c106f0">
                    <property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.columnHeader" value="columnHeader"/>
                </reportElement>

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...