Print Page | Close Window

using select expert to filter data

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=14125
Printed Date: 26 Apr 2024 at 7:55pm


Topic: using select expert to filter data
Posted By: jpsstar
Subject: using select expert to filter data
Date Posted: 18 Aug 2011 at 5:07am
I'm having difficulty with using the select expert to filter out the data in my report.
 
I am pulling from a template database with three fields Name, Enrolled, Unenrolled.
 
I have a select expert saying to only pull Names of those who are Enrolled but to exclude those who are Unenrolled. When a name is enrolled on the template Enrolled = 1. When a name is unenrolled Enrolled = "" and Unenrolled = 1.
 
My select expert looks like this:
{Enrolled} = 1 and
{Unenrolled} <> 1
 
On Monday Jane Doe is enrolled so Enroll = 1. On Tursday Jane Doe is unenrolled so Enroll = "" and Unenrolled = 1.
 
When I run the report on Friday Crystal pulls the old value of Enroll = 1 from the template database and ignores the fact that Unenrolled = 1.
 
Curiously, if I add in select expert:
not ({Name} in ["Jane Doe"]
then Jane Doe will get filtered out.
 
Is there a way so that Crystal will only recognize the latest value (Thursday's: Unenrolled = 1) and not search the database for old values (Monday's: Enroll = 1) when displaying Name?
 
So far I've had to manually add the not ({Name} in ["Jane Doe"] for the names unenrolled just to keep my report up to date.
 
Thanks in advance!



Replies:
Posted By: hilfy
Date Posted: 18 Aug 2011 at 9:29am

Have you run a query against the database to validate that Enrolled and Unenrolled have actually changed for the name you're looking at?

Also, do you have "Save Data With Report" turned on?  If so, turn it off!  It could be that you're actually looking at old data when you first open the report - Crystal doesn't automatically refresh the data when you open it.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window