我需要帮助根据此查询在SSRS中创建表达式:
SELECT COUNT(DISTINCT person_id) FROM person_table
WHERE (employed = 'Y' or title = 1)
or (start_date = '' or start_date = '00000000'
or start_date > CONVERT (VARCHAR,GETDATE(),112))
到目前为止我所拥有的只是这个
=CountDistinct(IIf(Fields!no_unresolved_allergies_ind.Value = "Y",Fields!MRN.Value,Nothing))
答案 0 :(得分:0)
由于信息有限,我将尝试这些方法
User model
#Returns the total mensal cost
def max_mensal
animals.sum(:mensal_cost)
end
Animal model
#Validates the mensal ammount
validate :check_form_mammount
def check_for_mammount
if user_id && user.max_mensal > (value here)
errors.add(:mensal_cost, message: 'msg here')
end