我需要用阿拉伯字母显示数字1 2 3
我在文本框中写下这句话
=FormatNumber(Fields!Size.Value,1,-2,-2,-2)
但我不知道它的参数以及哪个参数可以用阿拉伯语格式显示数字
非常感谢
答案 0 :(得分:2)
将报告语言设置为您的本地语言( ar-EG ) 在文本框属性中将 NumeralVariant 设置为 3
<强>引用强>
限制
1-不适用于包含数字的字符串
2-不适用于日期
解决限制 我的性能不佳
您可以在任何可能包含数字的字符串中使用Replace方法替换任何带有阿拉伯数字的英文数字 你的表达将是这样的事情
=Replace(Replace(Replace(Fields!FieldName.Value,"0","۰"),"1","۱"),"2","۲")
完整表达到9
答案 1 :(得分:1)
您可以在代码中编写函数并使用
public function index(){
$roles = Role::all();
$rt = new RoleTransformer();
return $this->response->collection($roles, $rt->transform($roles))
->setStatusCode(200);
}
用法:
Public Shared Function farsi(input As String) As String
Dim result As String = input
result = result.Replace("1", "۱")
result = result.Replace("2", "۲")
result = result.Replace("3", "۳")
result = result.Replace("4", "۴")
result = result.Replace("5", "۵")
result = result.Replace("6", "۶")
result = result.Replace("7", "۷")
result = result.Replace("8", "۸")
result = result.Replace("9", "۹")
result = result.Replace("0", "۰")
Return result
End Function
答案 2 :(得分:0)
Public Shared Function Arabic(input As String) As String
Dim result As String = input
result = result.Replace("1", "۱")
result = result.Replace("2", "۲")
result = result.Replace("3", "۳")
result = result.Replace("4", "٤")
result = result.Replace("5", "۵")
result = result.Replace("6", "٦")
result = result.Replace("7", "۷")
result = result.Replace("8", "۸")
result = result.Replace("9", "۹")
result = result.Replace("0", "۰")
Return result
End Function
将它用于阿拉伯数字 = Code.Arabic(领域!OrderID.Value) = Code.Arabic(字段名)