我正在研究Crystal Reports XI中的一个报告,该报告允许某人使用大量可选动态参数筛选帮助台票证。如果我为每个参数进行选择,它会返回预期的结果,但是如果省略了任何参数,它将不会返回任何内容,并且当我查看SQL查询时,它会显示“没有SQL查询被使用,因为记录选择公式不会返回记录。“目前,我有记录选择下面的代码:使用可选参数筛选Crystal Reports
{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的工作正常。有任何想法吗?