Crystal Reports 11.5 select all records for numeric field

Joe D
Joe D used Ask the Experts™
on
Hi.  I've been trying to figure out this issue but I think I'm making it overly complex.  I want to select all records for a journal entry based on user input for a numeric field.  

The selection criteria I use currently only works for one or more journal numbers:
 {tglTransaction.JrnlNo} in {?JournalNo}.  

How do I make this work for "All records"?  I have no problem using wildcards and such for strings but can't make the leap in how to do it based on number fields.  I want the user to input one or more journal entry numbers, or something akin to "*" for all journals, and have the data set filter for that input.  

Thanks in advance for your help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Try this idea

Pick a value say 99999 to represent all.
Change the prompt to
   
     "Enter a list of values (Use 999999for all): "

Change the selection criteria to

{?JournalNo} = 999999
OR
{tglTransaction.JrnlNo} in {?JournalNo}

Open in new window


mlmcc

Author

Commented:
Thanks for the quick reply  I see where you're going with this but I don't understand what goes in the "then" part of the statement for selecting all records:

if {?JournalNo} = 999999
   Then ??????
   Else {tglTransaction.JrnlNo} in {?JournalNo}

What's the equivalent of the string selection "*" for number fields?
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
You can use exactly what I gave you or in your method use TRUE

if {?JournalNo} = 999999 Then 
    True
Else 
    {tglTransaction.JrnlNo} in {?JournalNo}

Open in new window


mlmcc

Author

Commented:
Thank you.  I was expecting to have the parameter used in the selection of all records.  Now that I understand that the 999999 has nothing to do with selection at all, what you did this makes perfect sense.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial