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

How to remove a blank line in a iReport crosstab?


CharleyDC5

Recommended Posts

Hi folks,

Hope you are doing fine.

Here is my problem : I work on a report containing a crosstab. That crosstab is populated by a SQL query runned in a dataset. Everything's perfect, but I only have one tiny problem, which is quite annoying. I am unable to hide/remove a full blank line in my crosstab (see the screenshot for more information).

Some will probably say : Why are you adding a blank record in your query results ?
Answer : Well, this is a specific situation. I will try to make it easy to understand. Here we go :

For instance you have a list of laptops in a crosstab. You will need a row group on the serial number, and a column group on the laptops brands.

Let's say you want to list all laptops in a region, for every location/office.

• Office A only has HP and Dell laptops
• Office B only has HP and Lenovo laptops

The problem : You want to show all laptop brands, even if a location doesn't have that laptop brand. (see the second screenshot/image for more information). To achieve it, I add a NULL record in my SQL temp table, representing laptop brands that are missing in the office.

Example : Office A has a NULL record with the Lenovo brand, and Office B has a NULL record with the Dell brand.

This is the only way I found to always print all the columns in the crosstab. Otherwise, the crosstab wasn't showing the NULL columns since it is not available in the SQL query results (raw data).

I just want to hide that null row and eliminate the spacer it creates.

Every field in the crosstab details has Remove Line When Blank checked. As you can see, the line has nothing printed. Now, I just need to hide it for esthetic purpose.

Thank you in advance for help

Charles M.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 1 year later...

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