Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport Date Selection help please

Status
Not open for further replies.

jpeters01

Technical User
Dec 5, 2007
109
US
I have a Crystal V10 report that uses {appt.start_datetime} = {?StartDate} in the selection formula to pull scheduled appointments. There is a subreport that is linked to the main report by a Patient_id field and ?StartDate to ?Pm-StartDate. I need the subreport to pull all appointments {appt.start_datetime} >= {?Pm-StartDate}. This works however the report takes too long to run. I am hoping it will speed things up if I use a date range in the subreport selection formula to limit the appointments to those scheduled in the next 90 days, roughtly something like {appt.start_datetime} in {?Pm-StartDate} to {?Pm-StartDate}+90 but I can't figure out the formula. Can you help please?

 
You might try this:

1. Create a formula in the main report:
{@EndDate}
{?StartDate} + 90

2. Use this formula to link to a new "End Date" parameter in the subreport.

3. Update the selection formula in the subreport to be something like this:

{appt.start_datetime} >= {?Pm-StartDate} and
{appt.start_datetime} <= {?Pm-EndDate}

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top