I am current developing a report using Crystal Reports v10. I initially created it by linking a number of tables and adding a date range parameter as well as a location parameter however, the performance was dismal and as a result, I am now looking at developing a similar report using an SQL Command.
The SQL was going fine until I tried to incorporate the date range parameter into the Command. I have checked a few forums and it appears that I can’t actually add a date range parameter to a Command.
What I’m hoping to do is report on how many people were housed at a particular facility over a date range entered by the user. People who entered the facility prior to the beginning of the date range but left within the date range or entered the facility prior to the date range and are still in the facility should also be counted.
The original report had the following in the select {PLACEMENTS.START_DATE} <= {?Date Range} and {DETENTION_FACILITIES.AGENCY_CODE} = {?Station Code} and
(isnull({PLACEMENTS.END_DATE}) or {PLACEMENTS.END_DATE} = {?Date Range})
Is there anyway I can write something similar into my SQL command? I should also mention that the PLACEMENT.START_DATE field is a date/time field however I would want the parameter to appear as a date field.
Any assistance would be appreciated.
Thank you.
The SQL was going fine until I tried to incorporate the date range parameter into the Command. I have checked a few forums and it appears that I can’t actually add a date range parameter to a Command.
What I’m hoping to do is report on how many people were housed at a particular facility over a date range entered by the user. People who entered the facility prior to the beginning of the date range but left within the date range or entered the facility prior to the date range and are still in the facility should also be counted.
The original report had the following in the select {PLACEMENTS.START_DATE} <= {?Date Range} and {DETENTION_FACILITIES.AGENCY_CODE} = {?Station Code} and
(isnull({PLACEMENTS.END_DATE}) or {PLACEMENTS.END_DATE} = {?Date Range})
Is there anyway I can write something similar into my SQL command? I should also mention that the PLACEMENT.START_DATE field is a date/time field however I would want the parameter to appear as a date field.
Any assistance would be appreciated.
Thank you.