我正在使用CR上的动态参数创建报告。
所有参数都应该是可选的,就像最终用户没有选择任何参数一样,那么它就会像这个参数一样根本不存在。
经过一番搜索后,我找到了.HasValue()函数,使用后报告显示没有数据,所以也许我在这里遗漏了一些东西。
这是我的原始配方
{Command.Invoice Date} in {?Date} to {?To Date} and {Command.SeriesName} = {?Department} and {Command.DocNum} = {?DOCUMENT NO} and {Command.SlpName} = {?Sales Emploee}将函数插入此公式的正确方法是什么?
I am creating a report with Dynamic parameters on CR.
All the parameters should be optional, as if the end user haven't select any parameter, then it will act like this parameter didn't exist at all.
After some searching I found the .HasValue() function, and after using it the report shows no data at all, so maybe I am missing something here.
Here is the original formula I have
{Command.Invoice Date} in {?Date} to {?To Date} and {Command.SeriesName} = {?Department} and {Command.DocNum} = {?DOCUMENT NO} and {Command.SlpName} = {?Sales Emploee}What is the right way to insert the function here to this formula?
最满意答案
我经常使用hasValue()函数,如下所示:
(not hasValue({?Date}) OR {Command.Invoice Date} >= {?Date}) and (not hasValue({?To Date}) OR {Command.Invoice Date} <= {?To Date}) and (not hasValue({?Department}) OR {Command.SeriesName} = {?Department}) and (not hasValue({?DOCUMENT NO}) OR {Command.DocNum} = {?DOCUMENT NO}) and (not hasValue({?Sales Emploee}) OR {Command.SlpName} = {?Sales Emploee})因此,参数没有值,或者根据参数值检查列中的值。
I have most often used the hasValue() function as follows:
(not hasValue({?Date}) OR {Command.Invoice Date} >= {?Date}) and (not hasValue({?To Date}) OR {Command.Invoice Date} <= {?To Date}) and (not hasValue({?Department}) OR {Command.SeriesName} = {?Department}) and (not hasValue({?DOCUMENT NO}) OR {Command.DocNum} = {?DOCUMENT NO}) and (not hasValue({?Sales Emploee}) OR {Command.SlpName} = {?Sales Emploee})So either the parameter doesn't have value or the value in the column is checked against the parameter value.
更多推荐
发布评论