c# - 如何在条件下隐藏 Crystal Report 中的数据库字段

标签 c# sql-server crystal-reports

我主要使用 RDLC 报告, 如果我想隐藏任何字段 在 Visibility.Hidden 属性中,我像这样为它编写表达式

 =IIf((Fields!SetBarcode1.Value="NOT APPLICABLE"), True,False)

同样,我如何隐藏拖放到 Crystal Report 中的任何数据库字段,

例如,我的字段名称是 TAG11,如果它在运行时包含“不适用”,则应将其隐藏,否则显示。

通过谷歌搜索我发现我必须写表达式 通过右键单击字段 => 选择 Formate 对象 => 在 Common 选项卡上我找到了 Supress if Duplicated 选项我应该在其中写 Expression, 但我不知道如何......我不知道表达式的语法

我有这份报告

enter image description here

在值 11 上我给出了这个公式

enter image description here

但它不工作 Report Shows like

enter image description here

最佳答案

插入这个公式:

{dtTotalProduction.Value11} = "NOT APPLICABLE"

并检查 suppress 属性 not suppress if duplicate

关于c# - 如何在条件下隐藏 Crystal Report 中的数据库字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24299323/

相关文章:

c# - 创建后删除文件

mysql - 将 SQL Server 数据库架构移植到 MySQL 的最佳方式

mysql - 如何将映泰 V1.8 Suprema 连接到 MySQL?

visual-studio-2012 - Crystal Reports for VS2012 – 免费与否?

c# - 设计复杂 LINQ 代码的建议

c# - WPF - 使用 DisplayMemberBinding 向 GridViewColumn 添加工具提示

c# - LinkedList 比 List 迭代更快?

sql-server - SQL Server 输出子句转换为标量变量

c# - 如何在C#Win Form应用程序中设置Sub Crystal报表的数据源

c# - 在 Visual Studio 2005 中使用 Crystal Reports(C# .NET Windows 应用程序)