Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 831923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:16:59+00:00 2026-05-15T04:16:59+00:00

I want to generate a pdf report, where a column(or cell/field) is left blank(empty)

  • 0

I want to generate a pdf report, where a column(or cell/field) is left blank(empty) on purpose. This column actually does have a value but, I’m choosing not to display it. The column title still needs to be displayed.

Example of where this could be useful:

  • Blank(empty) column: A comments or notes column down one side of a report.
  • Blank(empty) cell: A sudoku puzzle print-out.

Much appreciated. DynamicJasper is Awesome! Thanks to the dj-team.

Regards,
Pete

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:17:00+00:00Added an answer on May 15, 2026 at 4:17 am

    Glad to announce, solution found for adding an ’empty’ column – and in short, it’s to create a customExpression.

    def cb = ColumnBuilder.getInstance()
    cb = cb.setTitle("Notes")
    cb = cb.setCustomExpression(new BlankExpression())
    AbstractColumn columnNotes = cb.build()
    

    Then add it to the rest of the report.

    Class BlankExpression is

    public class BlankExpression implements CustomExpression {
    
        public BlankExpression() {    }
    
        public Object evaluate(Map fields, Map variables, Map parameters) {
            return " ";
        }
    
        public String getClassName() {
            return String.class.getName();
        }
    }
    

    But there are a few issues relating to the use of customExpressions and grails.

    1st issue: “getNew()” – The examples provided on the DJ website all use “getNew()”
    http://dynamicjasper.sourceforge.net/docs/HOWTO%20Create%20Custom%20Expressions.html is an example of DynamicJasper v3.1.3 where as the Grails plugin is based on v.3.0.6 which only has a getInstance() method (deprecated in 3.1.3)

    2nd issue: As far as I can see, groovy doesn’t allow java-style inline class implementations, thus forcing us to create a separate class file. But this is not a big problem. I might be wrong about this, and please correct me.

    Hope this helps you too.

    Regards,
    Pete

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to generate crystal report in pdf format. I had done the same
I want to generate a PDF file on server side, and then in response
I want to be able to generate PDF output from my (native) C++ Windows
I want to remove a blank page from a PDF generated using the iText
Let's say I have a class of 30 students and want generate every possible
I want to generate a report each day and then export that to a
i want using php generate a pdf in my site with some format and
Are there any API/solution to generate PDF report from XML file data and definition.
I want to generate a technical report from lisp (AllegroCL in my case) and
With the sharpPDF library I generate a pdf memory stream, and I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.