I agree with both of you. Here is my problem: I am an intern, and the 0 is the way the company has been doing it (though it is not working). I am going to suggest the "All", b/c I think it makes more sense as well. Also, the crystal program was developed(and is already) by someone...
Sale_no_in & sale_drop_in are two different, but important, parameters.
I entered this for sale_drop_no:
BeforeReadingRecords;
numberVar upperRange;
numberVar lowerRange;
if not numerictext({?sale_no_in}) then //ie. 'ALL' selected
(lowerRange := 0;
upperRange := 9999999;) // or suitable...
Ngolem: AddCrystalReportParm 2, intDrop_no, 7
Do I need to change the intDrop_no to something else, so that crystal expects a string instead of a number?
When I try to use the Select - Sale_drop_no formula that you gave me, I get an error on the first line: String is expected. Is that...
balves: When I do "Show SQL query" I actually do show a WHERE...which is the code I showed you from above with the two different scenarios...that is the code that shows up in the "SHOW SQL Query" which is produced from the code we have created in the Formula Editor...so we...
Yep...both parenthesis are there...it still uses the = and the > and I just need it to pick one based on a number > 0...or = to 0...thats it...but it wont select a specific scenario...
We are getting close!!! Ken...I understand now...and no, I am not getting the exact results I need.
balves: Ok...this is the WHERE that is produced from your code if the user enters a sale_drop_no of...say...206:
sa_bale_class."sale_no" = 73333. AND...
Ok. Two good points. To KenHamady: I am not sure what the report designer is. If I leave out the ELSE and just include the IF...Crystal ignores the IF and processes the line after the IF ({sa_bale_class.sale_drop_no} = {?drop-no-in})...and I can get a result...as long as I am not trying to...
This is the code:
{sa_bale_class.sale_no} = {?sale_no_in} and
{sa_bale_class.current_division_no} <> 35 and
{sa_bale_class.current_division_no} <> 38 and
if {?drop-no-in} > 0 then
{sa_bale_class.sale_drop_no} = {?drop-no-in}
Else
{sa_bale_class.sale_drop_no}>0...
Here is the code:
1. {sa_bale_class.sale_no} = {?sale_no_in} and
2. {sa_bale_class.current_division_no} <> 35 and
3. {sa_bale_class.current_division_no} <> 38 and
4. If {?drop-no-in}>0 Then
5. {sa_bale_class.sale_drop_no}={?drop-no-in}
6. Else
7...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.