Working with multiple Parameters in Crystal Reports 8.5

When you are working with multiple parameters that have the option for ALL vs a range of values or individual (discrete) value.

How do you know which parameter to line up or select first. Is there a hierarchy that should be used based on linked tables and do you have to consider that when selecting which parameter should be selected first.

Currently there is a history table {OELINHST_Terr} see image and it will point to the table which I have to get records from the {IMITMIDX_SQL} in Prod_cat field.
Is there a method to this.....?
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Not sure what you by which to select first.  CR8.5 can't relate parameters so the values selected for 1 parameter will NOT change the values available in other parameters.

Example, if you have parameters to allow the user to filter on country, state, city if they choose ENGLAND as the country New York City will still be available in the city list if it is there.  New York or Tennessee will be there for the state.

mlmcc
0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
I guess the point was does it matter which one I pick based on the primary tables vs the child tables coming from the Table Schema. I have a History table as the primary and a SQL query table that comes off it with a left outer join. I was wondering if it mattered or do you design the RECORD SELECTION to reflect that choice. I was not clear on that in the initial question. Like do I have to use Parenthesis in a certain order or something.....?
MacolaTables.png
0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
For Instance I have all the Parameters to contend with in the RECORD SELECTION.

({Rpt_OELINHST_Terr.inv_dt} in {Rpt_ReportingDates.CurrFromDateYTD} to {Rpt_ReportingDates.CurrToDateYTD} or
{Rpt_OELINHST_Terr.inv_dt} in {Rpt_ReportingDates.PriorFromDateYTD} to {Rpt_ReportingDates.PriorToDateYTD}) and
{Rpt_OELINHST_Terr.item_no} in {?ItemRange} and
{Rpt_OELINHST_Terr.cus_no} in {?CustomerRange} and
if {?RptTerr} = "ALL" and {?AdoptedTerr} = "ALL" then
{Rpt_OELINHST_Terr.Terr} in "99" to "ZZ"
else
    if {?RptTerr} = "ALL" and {?AdoptedTerr} <> "ALL" then
    ({Rpt_OELINHST_Terr.Terr} in "99" to "ZZ" and {@TimsTerritory} )
       or ({Rpt_OELINHST_Terr.Terr} in {?AdoptedTerr} and {@AdoptedTerritory} and {ARCUSFIL_SQL.terr} in "99" to "ZZ")
    else
        if {?RptTerr} <> "ALL" and {?AdoptedTerr} = "ALL" then
        ({Rpt_OELINHST_Terr.Terr} in {?RptTerr} and {@TimsTerritory})
          or ({Rpt_OELINHST_Terr.Terr} in "99" to "ZZ" and {@AdoptedTerritory} and {ARCUSFIL_SQL.terr} in {?RptTerr})
        else
        ({Rpt_OELINHST_Terr.Terr} in {?RptTerr} and {@TimsTerritory} )
          or ({Rpt_OELINHST_Terr.Terr} in {?AdoptedTerr} and {@AdoptedTerritory} and {ARCUSFIL_SQL.terr} in {?RptTerr} )
0
mlmccCommented:
It doesn't matter which order you select the parameters in.

The only thing you want in the filter is to ensure you get the filter you want.

If you use all ANDs or all ORs then ( ) don't come into it.
Order of the tests doesn't matter except to filter out the most records in the first test.

In your case since you have an ALL option you will probably use something like

({?Country} = 'ALL' or {Country Field} = {?Country})

In that case you will need ( ) around them so they are treated as a single test

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
That worked thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.