×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Record Selection Formula Question

Record Selection Formula Question

Record Selection Formula Question

(OP)
I have created a report that uses a date range parameter I'll call it ?fromdate and ?todate. I want to create a report that will return the most recent input to a field I'll call "Status" which uses  a timestamp field which I will call "Creation_Date".  I would like to report on the last time this "Creation_Date" was updated within the date range request. I want the report to print only the records with a "Creation_Date" that was added more than seven days ago. I have been able to create and run a report that includes all "Creation_dates" that are not within the last seven days, but unfortunatly this also returns status that are within the requested date range and only the "creation_Dates that are not in last seven days.
{@DateRange} and
(if {?Group_ID} <> "" then
     {@TSGRP} = UpperCase({?Group_ID})
else
     {@TSGRP}  >= UpperCase({?Group_ID})) and
(if {?Call_Status} <> "" then
    {@status} = UpperCase({?Call_Status})
else
   {@status}  >= UpperCase({?Call_Status})) and
(if {?Operator_ID} <> "" then
     {@TSOPER} = UpperCase({?Operator_ID})
else
     {@TSOPER}  >= UpperCase({?Operator_ID})) and
not ({@CreDate} in Last7Days)



I hope that I was able to explain this correctly, If not I sure someone will lte me know.
Thanks
Kenny
 

RE: Record Selection Formula Question

Selecting the records and finding the most recent are two different functions.  You can't find the most recent until you return all of the eligible records to the report.

So, to be eligible you need a create between start and end, but not in the past 7 days.  Is that the right criteria?

Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: Record Selection Formula Question

Tojo1234 to it!

You seem to be suffering from the same Crystal Disease that I do most of the time. I may be wrong but it seems you are over complicating this situation.

Lets start with you date Parameters, ?StartDate ?EndDate
and don't forget your {Creation.Date} field. These are the important players if I understood what you wrote.

Try this:

{Creation.Date}>= ?StartDate and
{Creation.Date} < ?EndDate   and  
{Creation.Date} < currentdate-7

This will eliminate the records you don't want to see

Then Create a group on your Date field {Creation.Date} set the section to be printed for each year, Insert the {Creation.Date} into the details section and then insert a summary on the {Creation.Date}  and use 'maximum' in the summary choices. Then suppress the details and Create another Fromula to pull out the staus feild you are looking for:

if {Creation.Date} = Maximum ({TICKET.RUNDATE}, {TICKET.RUNDATE}, "annually") then {@Status} else ''

I hope this helps

Paul Ellsworth

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close