Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/298.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 报告字符串中的位数_C#_Crystal Reports - Fatal编程技术网

C# 报告字符串中的位数

C# 报告字符串中的位数,c#,crystal-reports,C#,Crystal Reports,我的报告需要计算目标值中的位数。全国电话超过10位数,本地电话少于10位数,国际电话正好有10位数。如何将这些不同的通话类型分为不同的部分 我会创建一个新的公式,作为团队的基础。在公式中,使用以下代码: If Length(CSTR({yourTable.destination})) < 10 Then "Local" Else If Length(CSTR({yourTable.destination})) > 10 Then "National" Else "Interna

我的报告需要计算目标值中的位数。全国电话超过10位数,本地电话少于10位数,国际电话正好有10位数。如何将这些不同的通话类型分为不同的部分


我会创建一个新的公式,作为团队的基础。在公式中,使用以下代码:

If Length(CSTR({yourTable.destination})) < 10 
Then "Local"  
Else If Length(CSTR({yourTable.destination})) > 10
Then "National"
Else "International"
If长度(CSTR({yourTable.destination}))<10
然后是“本地”
如果长度(CSTR({yourTable.destination}))大于10
然后是“国家”
其他“国际”

然后添加一个新的组,用这个新公式作为判定。

我将创建一个新公式作为组的基础。在公式中,使用以下代码:

If Length(CSTR({yourTable.destination})) < 10 
Then "Local"  
Else If Length(CSTR({yourTable.destination})) > 10
Then "National"
Else "International"
If长度(CSTR({yourTable.destination}))<10
然后是“本地”
如果长度(CSTR({yourTable.destination}))大于10
然后是“国家”
其他“国际”

然后使用此新公式添加一个新组作为确定值。

您可以将目的地转换为字符串,然后计算字符数:myDestination.ToString().Length您可以将目的地转换为字符串,然后计算字符数:myDestination.ToString().Length