【发布时间】:2016-03-12 02:58:48
【问题描述】:
我正在处理 Crystal Reports XI 中的一个报表,该报表允许某人使用一些可选的动态参数过滤技术支持工单。如果我为每个参数进行选择,它会返回预期的结果,但如果我遗漏任何参数,它不会返回任何内容,当我查看 SQL 查询时,它会说:“没有使用 SQL 查询,因为记录选择公式不返回任何记录。”我目前有以下用于记录选择的代码:
{Incident.State:} = "C" and
{Incident.Close Date & Time} in {?BDate} to {?EDate} and
If HasValue({?Group}) Then (
{Groups.Code} = {?Group}
)
and
If HasValue({?Category}) Then (
{Incident.Subject Description} = {?Category}
)
and
If HasValue({?Staff}) Then (
{Incident_Details.Login ID} = {?Staff}
)
and
If HasValue({?Community}) Then (
{Incident.Company Name} = {?Community}
)
对我来说,这似乎应该可以工作,如果我省略 If 语句来验证参数是否具有值,我会收到一个错误,因此 HasValue 似乎工作正常。有什么想法吗?
【问题讨论】:
标签: crystal-reports