Skip to Content
0
5 days ago

Yes/No parameter determines if Second parameter(s) is used or not

53 Views Last edit 4 days ago 2 rev

I am currently using Crystal Reports 2016. What I am attempting to do is when the Previous Month parameter comes up and you choose YES, then it run for previous month (lastfullmonth). I don’t want the Episode Start Date parameter and Episode Stop Date parameter be required to have a date inserted.

When the Previous Month parameter comes up and answer is NO, then it should require you to put in dates for the 2 parameters.

(IsNull({VWCIS_EPISODE.EPI_END_DATE}) or {VWCIS_EPISODE.EPI_END_DATE} >= {?Select Start Date} and {VWCIS_EPISODE.EPI_START_DATE} <= {?Select Stop Date}))

The following is my Select Expert:

{VWCIS_EPISODE.EPI_FAC2} = {?Facility #} and {VWCIS_MOVEMENT.STAT_FC} in ["1", "2", "5"] and

{TBST04A.DIAGNOSIS_CODES} like "F*" and {@DD Facility} and

(if {?PreviousMonth}= "Yes"

then

(IsNull({VWCIS_EPISODE.EPI_END_DATE}) or {VWCIS_EPISODE.EPI_END_DATE} >= minimum(lastfullmonth) and {VWCIS_EPISODE.EPI_START_DATE} <= maximum(lastfullmonth))

Else

(IsNull({VWCIS_EPISODE.EPI_END_DATE}) or {VWCIS_EPISODE.EPI_END_DATE} >= {?Select Start Date} and {VWCIS_EPISODE.EPI_START_DATE} <= {?Select Stop Date}))

The following are my parameters

{?Facility #}

{?PreviousMonth}

{?Select Start Date}

{?Select Stop Date}