Print Page | Close Window

Help with Selection Criteria

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21032
Printed Date: 06 May 2024 at 1:31am


Topic: Help with Selection Criteria
Posted By: meg76148
Subject: Help with Selection Criteria
Date Posted: 16 Sep 2014 at 5:25am
I am new to Crystal Rpts...I am trying to write a selection criteria formula. Here is what I am trying to say..

if the temp.date is empty (null) but the perm.date had a date (not null)

then pull all records where that perm.date is < the projected.date and a perm.date is in a date range for the projected.date (projected.date{?start date} to projected.date {?end date})

also pull

all records with a projected.date that is between the projected.date {?start date} and projected.date {?end date}

here is what I wrote:
(isnull({temp.date}) and not isnull({perm.date}) and
{perm.date} < {projected.date} and
{projected.date} in {?sdate} to {?edate}

this is only returning records with perm.dates

any suggestions?




Replies:
Posted By: DBlank
Date Posted: 16 Sep 2014 at 7:53am
are all these values coming from the same table? if not how are you joining the tables? are there always matching records in all tables?


Posted By: meg76148
Date Posted: 16 Sep 2014 at 8:20am
Thank you for your reply.

There are two tables both have been pulled into crystal. the perm.date and the temp.date are from one table and the projected.date is from another table. so it really should have read...status.perm_date and status.temp_date then projectedstatus.projected_date.


Posted By: DBlank
Date Posted: 16 Sep 2014 at 8:30am
how are you joining th tables?
is it a 1:1 ratio with these tables?



Print Page | Close Window