suppress column and remove blank space in crystal

2019-01-28 03:11发布

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.

5条回答
狗以群分
2楼-- · 2019-01-28 03:44

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

查看更多
Lonely孤独者°
3楼-- · 2019-01-28 03:49

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.

查看更多
够拽才男人
4楼-- · 2019-01-28 03:51

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
查看更多
手持菜刀,她持情操
5楼-- · 2019-01-28 03:54

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.

查看更多
Bombasti
6楼-- · 2019-01-28 04:01

I found difficulty in suppressing column name if its field value is null in crystal report in Visual Studio 2008. I write the code ({tableName.FiledName})="".

It is very simple. Just right click the column name, choose format object, then a window will open. In the common tab, check the suppress check box. Click the x-2 icon beside suppress check box, then a format formula editor will open, write the code ({tableName.FiledName})="" then save and exit. If you make error, the editor will popup the message of error. you would notice that column name will be dimmed or disabled.

查看更多
登录 后发表回答