Print Page | Close Window

Long selection formula

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=362
Printed Date: 03 May 2025 at 2:15pm


Topic: Long selection formula
Posted By: cjbuechler
Subject: Long selection formula
Date Posted: 20 Mar 2007 at 12:13pm
Hi, I'm guessing this is a simple question since it seems like Crystal should be able to do this....chances are its just me doing it wrong.
 
I have a report, it links up with the SQL tables in it perfectly fine. I'm only throwing in "name" and "Company" but I want to select the records based on a selection formula. I want all records where ANY of the following fields are after a specific date....
 
Activedate1
Activedate2
Activedate3
Activedate4
Activedate5
Activedate6
Activedate7
 
I'm using a greater than symbol before the date and an OR inbetween each....now, when I test this it works great but ONLY for the first couple fields....if I make a record in the table that has Activedate1 equal to 5/5/07 (so that no one else will come up) then that record shows up in the report like it should. If I instead change that record so that Activedate5 or 6 or 7 is equal 5/5/07 then the record doesn't appear.
 
Thinking it might be the fields that were messed up I changed the order of them in the selection formula and yet they work. It seems like it checks the first part of my formula but not anything past the first couple.
 
Does that make sense? I guess the best way to ask this is how would one of you write  selection formula (in crystal 9) that checked to see if any of 7 fields were greater than a specific date?



Replies:
Posted By: BrianBischof
Date Posted: 20 Mar 2007 at 1:32pm
Sounds like a bug to me. You seem to have tested it pretty thoroughly and know what you are doing. One idea would be to set the SQL options to pass the filter to the server (the two properties are like Group on Server and use Index for Speed- or something like that) and then look at the SQL statement to see if the whole formula is being passed down.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window