Jump to content
We've recently updated our Privacy Statement, available here ×
  • No column headers get printed when there is no data in the adhoc report while exporting it into the CSV format.


    Prasad B
    • Features: Exporters Version: v8 Product: JasperReports® Server


    Problem Statement:

    Why is there no header in an export (in CSV format) from Ad Hoc Report when there is no data?

    Solution:

    By default, there is no data in the adhoc report, export of the report appears to be empty without headers. It is an expected behaviour.

    However, you want to get the column headers for the no data, we can achieve it using the certain modifications.

    Please follow the below steps for more details:

        1. Edit any of the report templates in Jaspersoft Studio. For reference, I have edited the Actual size template. It can be found at the public/Template Repository.
        2. Edit the When No Data Type Property to "All Section No Detail". Please refer to the attached screenshot (Edit_Report_Property.jpg) for more details.
        3. Publish this report template to the JasperReports Server to reflect the Changes.
        4. On the JasperReports Server, create the Report for the existing ad hoc view.
        5. When you load the report, you can see that only column headers will get rendered on the screen. Please refer to Column_headers_rendered.jpg for more details.
        6. When you exported this ad hoc view report into csv format, you will find that only column headers got printed. Please see the attached CSV file for reference. 
        

    Ref Case: #02192705    

    report_with_column_headers.csv


    User Feedback

    Recommended Comments

    There are no comments to display.



    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...