是否可以将多字段与一个条件iif语句

时间:2017-11-16 15:09:23

标签: reporting-services ssrs-2008-r2 report-builder2.0

我正在使用Report builder 2008处理ssrs报告,目前正在尝试使用类似的东西进行连接但是当我这样做时,我收到字段'lifeamount'的错误,指出表达式只能引用其中的字段当前的数据集范围。我尝试过不同的方法来指定所有字段都相同的数据集,但无济于事。这甚至可能吗?

=rtrim(First(Fields!FRSTNAME.Value,"EmployeeInfo")) & " " & rtrim(First(Fields!MIDLNAME.Value, "EmployeeInfo")) & " " & rtrim(First(Fields!LASTNAME.Value, "EmployeeInfo")) & " " & IIF((Fields!Lifeamount.Value)> 100000.00, 100000.00, Fields!lifeamount.value, "EmployeeInfo"))

2 个答案:

答案 0 :(得分:1)

SSRS表达式区分大小写,这意味着您的第二个lifeamount引用很可能是错误的。

请改为尝试:

=rtrim(First(Fields!FRSTNAME.Value,"EmployeeInfo")) & " " &
rtrim(First(Fields!MIDLNAME.Value, "EmployeeInfo")) & " " &
rtrim(First(Fields!LASTNAME.Value, "EmployeeInfo")) & " " &
IIF((Fields!Lifeamount.Value)> 100000.00, 100000.00, Fields!Lifeamount.value, "EmployeeInfo"))

答案 1 :(得分:1)

如果表达式位于与您提取的详细信息范围相同的单元格中(即" EmployeeInfo"),那么我认为您根本不需要指定它。

我认为还有一些不合适的括号。我现在无法测试它,但试试这个......

FROM python:3.6-alpine


ENV PATH :$PATH

ADD . /app
WORKDIR /app

#Install dependencies
RUN echo "===> Installing sudo to emulate normal OS behavior..."
RUN apk --update add sudo
RUN apk --update add libxml2-dev libxslt-dev
RUN apk --update add python py-pip openssl ca-certificates
RUN apk --update add --virtual build-dependencies python3-dev libffi-
dev openssl-dev build-base gfortran
RUN apk --update add libpulse-dev
RUN apk --update add py-pip jpeg-dev zlib-dev
RUN apk --update add  swig
RUN apk --update add sshpass openssh-client rsync

#Install python package + requirements.txt
RUN pip install --upgrade pip
RUN  pip install  -r requirements.txt

CMD ["python", "import_emails.py"]