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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Expert formula with multiple parameters

Status
Not open for further replies.

jodie

MIS
May 18, 2001
30
0
0
US
Hi,

I am doing a select expert formula that involves the usage of multiple parameters.

I am doing a report where the user wants to display the data for 3 months in the same report. Initially to achieve this I had created 3 parameters (Month, Month2, Month3). The month entered by the user was compared to a date field in the report (PropEffDate) in my database. So, my report had other select expert criteria and "Month of PropEffDate is one of Month, Month2 or Month3"

Since now we are in a new year, this formula does not work as well anymore. Bec. now if a user enters "1" for the month, it gives him Jan 2001 and Jan 2002 data. So, I need ot put in a prompt for the year too.

There are 2 problems I am running into.
First, I added three more prompts for the year (Year1, Year2, Year3). However, when a user runs the report, the reports prompts in this order: Month1, Month2, Month3, Year1, Year2, Year3.

Is there a way to change this order and prompt like this: Month1, Year1, Month2, Year2, Month3, Year 3

Second Problem:
Here is my select expert formula:

{Office.Office Number} = 189.00 and
{Proposal.Total Lives} >= 50.00 and
({@Year of PropEffDate} = {?3rd Year} and {@MonthOfPropEffDate} = {?Month 3}) or
({@Year of PropEffDate}={?2nd Year} and {@MonthOfPropEffDate}= {?Month 2}) or
({@Year of PropEffDate}={?1st Year} and {@MonthOfPropEffDate}={?Month})

But no matter how I add the parentheses, if I have an "Or" with "AND" in my select expert, it ignores the ANDS and the other criterias and treats all the AND in the report as OR too.

Has this happened to someone else too. This has happened with me in previous reports too.

sorry this is so long.
I would appreciate any help on this.
thanks

Jodie
 
You can change the order of the prompts by reordering them
in the Field Explorer (using the up & down arrow toolbar icons).

Cheers,
- Ido ixm7@psu.edu
 
Have you tried parentheses around all three of your OR's?

{Office.Office Number} = 189.00 and
{Proposal.Total Lives} >= 50.00 and
(({@Year of PropEffDate} = {?3rd Year} and {@MonthOfPropEffDate} = {?Month 3}) or
({@Year of PropEffDate}={?2nd Year} and {@MonthOfPropEffDate}= {?Month 2}) or
({@Year of PropEffDate}={?1st Year} and {@MonthOfPropEffDate}={?Month})) Mike

 
First the easy one, which happens to be your 1st question. In the field explorer, open up the parameter field item. Click on the parameter field you'd like to move, you should notice black up and down arrows in the menu of the field explorer. Hit the up arrow to where you want the parameter to show.

I need to look into problem 2 for a minute to see if I have any solution.
 
I really did try putting those parentheses around all three of my ORs before Mike, and they did not work but now when I tried it again -- it did work. Well, as long as it works -- Thanks a bunch for your help.

REgarding the resorting of the parameters, I know this maybe a dumb question...but I am not able to find the Field Explorer. where is that ...how do i get to it

Thanks
 
But, I don't have any up or down arrow keys there. On the Parameter tab ...the only buttons I have are : "Edit", "new", "Rename" and "Delete"

I am using Version 6.0 if that makes a difference.

Thanks
 
In version 6, afaik, you should be able to click
Insert, Parameter Field
select a aparameter and use up/down buttons
to change the order.

Cheers,
- Ido ixm7@psu.edu
 
I believe this is so weird. I have 2 people here that suggested I try reordering parameter fields by using the Up/down arrow buttons but I don't have those in the tab at all. When I click...INsert...Parameter field...I only see 4 buttons "edit, new, rename and delete" and I don't see arrows + I am not able to pull and drag the parameters in the order I want.

Would you know why I am not able to see Up/down buttons on my screen.

Sorry to bother again.
Thanks

 
Did you click to select one of the parameters in that dialog box?

ixm7@psu.edu
 
Yes, I did. Nothing happens if I click one, except for that that parameter is selected.

and if I double click, a circle with a diagonal line appears but i still don't see the Up/down arrows.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top