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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using date field in main report to select records in sub-report 1

Status
Not open for further replies.

RenaG

Programmer
May 3, 2011
132
US
Hi,

Using Crystal 10.

I have a main report that displays, among other things, the Appt_DtTme for a particular patient. In a sub-report, I need to use this date and select records that are between 3 months before this date and 3 months after this date. Nothing I have tried so far has worked. Any suggestions on how to do this? TIA!

~RLG
 
Link the sub to the main report on the appt datetime field, and then in the subreport, go to report->selection formula->record and change the formula to:

{table.datetime} >= {?pm-Appt_DtTme}-90 and
{table.datetime} <= {?pm-Appt_DtTme}+90

-LB
 
Excellent! I was making it way too complicated. Thanks for your help.

~RLG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top