简体   繁体   English

基于参数的SSRS计算

[英]Calculation in SSRS based on Parameter

I am trying to create a finance report based on date range parameters selected. 我正在尝试根据所选的日期范围参数创建财务报告。 There are 35 hours available each week. 每周有35个小时的可用时间。 If a person selects 2 weeks in the date parameters we want to calculate 35*2 as total hours available. 如果某人在日期参数中选择2周,我们要计算35 * 2作为可用总时数。

Is there a calculation that will help with this? 有没有计算方法可以帮助解决这个问题?

I would store the value 7 as a hidden parameter HoursPerWorkDay and then do the calculation based on work days between your 2 date parameters. 我会将值7存储为隐藏参数HoursPerWorkDay ,然后根据两个日期参数之间的工作日进行计算。

=((DateDiff(DateInterval.day, Parameters!StartDate.Value, Parameters!EndDate.Value) + 1) 
- DateDiff(DateInterval.WeekOfYear, Parameters!StartDate.Value, Parameters!EndDate.Value)*2) 
* Parameters!HoursPerWorkDay.Value

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM