Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select ALL parameters without having to select each one individually 1

Status
Not open for further replies.

jefRPT

Programmer
Dec 17, 2001
29
US
I have a quick question:
I'm creating a report that allows high-level managment to see all active studies that an investigator is involved with. One of the parameters I created has every investigators name in it so the user can choose who they want to report on.

Here's where my question comes in:

What if the user wants to see all active studies by all investigators? Its possible right now by selecting and adding each name when prompted in the begining, but thats a waste of time. I was wondering if there is a way for me to create a name called "ALL", which selects every name in the list. I tried to put an "*" in the prompt without selecting any names, but I get nothing back.
Thanks in advance
Jef
 
JefRPT-

I have done this. Simply create a paramter field with the prompt "Enter a Study # of ALL for All Studies". The put the following logic into your record selection formula:

//uppercase function covers case sensitivity
If uppercase({?parmfield})<>&quot;ALL&quot; then {Studynumber}={?Parmfield}

Let me know if you have any questions. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Thanks a lot dgillz. I used a slightly different formula, but your method led me to think that way. Thanks again, and here's what I used:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if({?INVESTIGATOR} = &quot;All Investigators&quot;) then
{PROT_USERS.USER_NAME} = {PROT_USERS.USER_NAME}
else
{PROT_USERS.USER_NAME} = {?INVESTIGATOR}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

{PROT_USERS.USER_NAME} being the table name

Jeff :)I
 
Dear Jeff,

I would suggest that you protect yourself from User ErrOrs and convert the result to uppercase as dgillz showed.

if(Uppercase({?INVESTIGATOR}) = &quot;ALL INVESTIGATORS&quot;) then
{PROT_USERS.USER_NAME} = {PROT_USERS.USER_NAME}
else
{PROT_USERS.USER_NAME} = {?INVESTIGATOR}

I learned this lesson the hard way...

rosemary




Rosemary Lieberman
rosemary@microflo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top