How do I convert this Crystal Report IF statement for use in a WHERE clause in Reporting Services?
Posted
by Spacehamster
on Stack Overflow
See other posts from Stack Overflow
or by Spacehamster
Published on 2010-04-16T00:30:26Z
Indexed on
2010/04/16
0:33 UTC
Read the original article
Hit count: 288
I'm trying to translate this Crystal Reports IF Statement for use in a WHERE clause -
{@receipt_datetime_daylight} in {?DateRange} and
(if {?Call Sign} = "All Call Signs" Then
{cacs_incident_task.resource_or_class_id} = {cacs_incident_task.resource_or_class_id}
Else If {?Call Sign} = "All Sierra Call Signs" Then
{cacs_incident_task.resource_or_class_id} in ["S10", "S11", "S12"]
Else If {?Call Sign} = "All Whiskey Call Signs" Then
{cacs_incident_task.resource_or_class_id} in ["W01", "W02", "W03"]
Else
{cacs_incident_task.resource_or_class_id} = {?Call Sign}) and
(if {?OffenceType} = "All Offences" Then
{cacs_inc_type.description} = {cacs_inc_type.description}
else
{cacs_inc_type.description} = {?OffenceType})
CASE statements don't work in Reporting Services, so I need to find a why of translating this into a WHERE clause. Does anyone know a way?
© Stack Overflow or respective owner