Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.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
Sql server 根据自己的值设置图表中数据标签的格式_Sql Server_Reporting Services_Ssrs 2008_Ssrs 2012 - Fatal编程技术网

Sql server 根据自己的值设置图表中数据标签的格式

Sql server 根据自己的值设置图表中数据标签的格式,sql-server,reporting-services,ssrs-2008,ssrs-2012,Sql Server,Reporting Services,Ssrs 2008,Ssrs 2012,我正在Reporting Services做报告。在图表中,我希望在图表中显示带有值的数据标签。但是,如果数字变大,我想缩短,然后像这样: 5300->5.3k 5300000->5.3M 在文本框和表格中,我可以使用以下公式作为示例来完成此操作 格式: =开关( ReportItems!Textbox15.Value

我正在Reporting Services做报告。在图表中,我希望在图表中显示带有值的数据标签。但是,如果数字变大,我想缩短,然后像这样:

5300->5.3k

5300000->5.3M

在文本框和表格中,我可以使用以下公式作为示例来完成此操作 格式:

=开关(
ReportItems!Textbox15.Value<1000,“€0.#”,
ReportItems!Textbox15.Value<1000000,“€#,.#K”,
对,“#,.00万欧元”)
我发现您还可以将公式中的文本框名称更改为我:

=Switch(
   Me.Value < 1000, "€0.#",
   Me.Value < 1000000, "€#,.#K",
   true,"€#,,.0M")
=开关(
Me.值<1000,“€0.#”,
Me.值<1000000,“€#,.#K”,
对,“#,.00万欧元”)

对于图表中的数据标签,有什么方法可以实现同样的功能吗?

您必须使用保存该值的字段

=Switch(    
    Fields!Amount.Value < 1000, "€0.#",
    Fields!Amount.Value < 1000000, "€#,.#K",
    true, "€#,,.0M"
)

如果有帮助,请告诉我。

您必须使用保存该值的字段

=Switch(    
    Fields!Amount.Value < 1000, "€0.#",
    Fields!Amount.Value < 1000000, "€#,.#K",
    true, "€#,,.0M"
)
让我知道这是否有帮助

=Switch(    
    AVG(Fields!Amount.Value) < 1000, "€0.#",
    AVG(Fields!Amount.Value) < 1000000, "€#,.#K",
    true, "€#,,.0M"
)