sql - Cascading parameter and multiple dates in Crystal report -


i trying create report in crystal (2011, v14.0), results displayed not consistent idea, feel below code should work no avail, clue appreciated! requires 1) user select cluster , based on (think country) 2) other parameter gets facility names filtered cluster (think state)

now, cluster should mandatory , if user doesn't select facility should consider displaying facilities in user specified cluster.

on top of there 4 date field in table, if of these dates falls between users selected date range should select them well. so, using formula

if (not hasvalue({?facilitynamevw})) {cmd_pwcode_shop.description} = {?facilitynamevw - description}  ,  ({workorder.actualstartdate} in {?from date} {?to date}  or {workorder.actualfinishdate} in {?from date} {?to date} or {workorder.projstartdate}in {?from date} {?to date} or {workorder.projfinishdate}in {?from date} {?to date} )  else (hasvalue({?facilitynamevw}) or {cmd_wo_shop_facility.facilityname} = {?facilitynamevw}) , ({workorder.actualstartdate} in {?from date} {?to date}  or {workorder.actualfinishdate} in {?from date} {?to date} or {workorder.projstartdate}in {?from date} {?to date} or {workorder.projfinishdate}in {?from date} {?to date} ) 

and here screenshot of the parameters setting in crystal 2011, v14.0 here screenshot of parameters setting in crystal 2011, v14.0

the problem solved now. @ first, realized report skips after executing first conditional statement on if test date in to xx, doesn't execute other condition on other different dates, on other reports different data multiple dates working fine. finally, somehow links , tables , views in data experts creating cartesian product , so, going crazy.

i created new view in sql, minimizing number of links , used parameterized sql command pull data filtered on 4 different fields , on top of it. added logic in select expert handle country , city. works fine.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -