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

Problem printing date range

Status
Not open for further replies.

cab1

Programmer
Jun 7, 2001
5
US
I'm trying to list employees whose termination date is within a range 6 months prior to the report date entered by the user, and employees whose disability date is within a range 12 months to 18 months prior to the report date entered by the user. The previous developer used the following formula that captured all data. I've tried variations of the formula without success. Any help you provide will be appreciated.

Local numberVar lastyearstart := Year ({?report date}) - 1;
Local numberVar monthstart := Month ({?report date});
Local numberVar daystart := Day ({?report date});

(({CODE} = "DIS" and
{EFF_DTE} < DateTime (lastyearstart, monthstart, daystart, 0, 0, 0))
OR
({CODE} = [&quot;TRM&quot;] and {EFF_DTE} < {?report date}))
 
Your link took me to your Home page and I guessed that you wanted me to check out the 'Printing Parameter Selections . . .' section, specifically the Range Values. Is that correct? BTW, this is a V7 system. I'm not sure that this formula will give me all the dates within each range, i.e., 6 months prior to the report date for TRM and 12 - 18 months prior to the report date for DIS. Can you give me an example of what you propose? Thanks in advance.
 
Sorry, I meant to say what happens when you try the formula that you posted?
What does it do wrong? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top