suppress column and remove blank space in crystal report

17,809

Solution 1

Crystal Reports doesn't have an automatic (or easy) way to dynamically move columns.

You might consider multiple header and details sections that could approximate this--simply suppress the sections that contain the fields with NULL values.

Solution 2

Right click on the report object and select Format Field. On the Format screen -> Number tab click the Customize button. On the Custom Style screen -> Number Tab check the "Suppress If Zero" box.

But i don't think it can exist in version 2003

Solution 3

Right Click on the field click on Format Object next go to Common Tab -> there you will see Suppress Check box (check that checkbox) next to that there is Formula Editor icon click on that next write formula

if isnull({FieldName} ) then 
true 
else
false

Solution 4

For what it's worth, I was having this issue for a completely separate reason. I had multiple groups in the report, one of which was a Document Date. Right-clicking the group and going to Group Options, the "Keep Group Together" option was checked. This meant when there were multiple dates they would get moved to a second page and leave a large white space on page 1.

The white space depended on the result set returned by the query; sometimes it showed up, sometimes not, depending on how many records there were with the same date. Spent a good 2 hours trying to figure that out.

"Keep Together" in the Section expert for the group was UNCHECKED and I didn't even realize there was a "Keep Group Together" option until I stumbled upon it.

Share:
17,809
Nejthe
Author by

Nejthe

Updated on June 05, 2022

Comments

  • Nejthe
    Nejthe almost 2 years

    I'm working on Microsoft Visual Studio 2003.

    I'm searching for a way to suppress a column if it is empty and replace the blank space left by the other columns.

    I'm searching everywhere but I can't find a compatible way to the version 2003.

    Does exist a simple way? I appreciate any help.