带开关错误的嵌套 IIF 语句
Nested IIF Statements with Switches Error
我的一个 tablix 字段中有以下语句,并且在呈现报告时收到#error。我不确定确切的问题,但如果有人能指出我正确的方向,那将会有所帮助;
=IIF(Fields!inflowType.Value="1",
Switch(
Fields!inflowTaxTreatment.Value = "0","Amount is Pre-Tax",
Fields!inflowTaxTreatment.Value = "1","Amount is Post-Tax/Not Taxed") ,Nothing)
Or
IIF(Fields!inflowType.Value = "3",
Switch(
Fields!inflowTaxTreatment.Value = "0","Tax Deferred",
Fields!inflowTaxTreatment.Value="1","Tax Free"),Nothing)
Or
IIF(Fields!inflowType.Value="0",
Switch(
Fields!inflowTaxTreatment.Value="0","0% Taxable",
Fields!inflowTaxTreatment.Value="1","50% Taxable",
Fields!inflowTaxTreatment.Value="2","85% Taxable"),Nothing)
基本上我不知道我是否可以使用嵌套的 switch 语句来实现同样的事情,我认为这是对另一个被接受的线程的建议,但它 is/does 对我不起作用。
尝试
=IIF(Fields!inflowType.Value="1",
Switch(
Fields!inflowTaxTreatment.Value = "0","Amount is Pre-Tax",
Fields!inflowTaxTreatment.Value = "1","Amount is Post-Tax/Not Taxed") ,
IIF(Fields!inflowType.Value = "3",
Switch(
Fields!inflowTaxTreatment.Value = "0","Tax Deferred",
Fields!inflowTaxTreatment.Value="1","Tax Free")
,
IIF(Fields!inflowType.Value="0",
Switch(
Fields!inflowTaxTreatment.Value="0","0% Taxable",
Fields!inflowTaxTreatment.Value="1","50% Taxable",
Fields!inflowTaxTreatment.Value="2","85% Taxable"),Nothing)
))
我不确定,但我认为这是你想要得到的,如果这对你有帮助,请告诉我。
我的一个 tablix 字段中有以下语句,并且在呈现报告时收到#error。我不确定确切的问题,但如果有人能指出我正确的方向,那将会有所帮助;
=IIF(Fields!inflowType.Value="1",
Switch(
Fields!inflowTaxTreatment.Value = "0","Amount is Pre-Tax",
Fields!inflowTaxTreatment.Value = "1","Amount is Post-Tax/Not Taxed") ,Nothing)
Or
IIF(Fields!inflowType.Value = "3",
Switch(
Fields!inflowTaxTreatment.Value = "0","Tax Deferred",
Fields!inflowTaxTreatment.Value="1","Tax Free"),Nothing)
Or
IIF(Fields!inflowType.Value="0",
Switch(
Fields!inflowTaxTreatment.Value="0","0% Taxable",
Fields!inflowTaxTreatment.Value="1","50% Taxable",
Fields!inflowTaxTreatment.Value="2","85% Taxable"),Nothing)
基本上我不知道我是否可以使用嵌套的 switch 语句来实现同样的事情,我认为这是对另一个被接受的线程的建议,但它 is/does 对我不起作用。
尝试
=IIF(Fields!inflowType.Value="1",
Switch(
Fields!inflowTaxTreatment.Value = "0","Amount is Pre-Tax",
Fields!inflowTaxTreatment.Value = "1","Amount is Post-Tax/Not Taxed") ,
IIF(Fields!inflowType.Value = "3",
Switch(
Fields!inflowTaxTreatment.Value = "0","Tax Deferred",
Fields!inflowTaxTreatment.Value="1","Tax Free")
,
IIF(Fields!inflowType.Value="0",
Switch(
Fields!inflowTaxTreatment.Value="0","0% Taxable",
Fields!inflowTaxTreatment.Value="1","50% Taxable",
Fields!inflowTaxTreatment.Value="2","85% Taxable"),Nothing)
))
我不确定,但我认为这是你想要得到的,如果这对你有帮助,请告诉我。