当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - suppress column and remove blank space in crystal report

问题描述:

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.

网友答案:

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.

网友答案:

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

网友答案:

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
网友答案:

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.

网友答案:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: