Removing a parameter from the Record Selection returns unusual amount of results. Did I do this correctly.

The goal was to remove all the components of the {?AdoptedTerr} parameter so that users would not see it in a modified report. So the following is the former and current change made to the reports Record Selection.

if {?RptTerr} = "ALL" then
{Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} in "00" to "ZZ"
else
if {?RptTerr} = "ALL" and {?AdoptedTerr} <> "ALL" then
   ({Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} in "00" to "ZZ" and {@TimsTerritory} )
      or ({Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr}in {?AdoptedTerr}
      and {@AdoptedTerritory} and {Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.TerrAdopted} in "99" to "ZZ")
   else
        if {?RptTerr} <> "ALL" and {?AdoptedTerr} = "ALL" then
        ({Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} in {?RptTerr} and {@TimsTerritory})
         or ({Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} in "00" to "ZZ"
      and {@AdoptedTerritory} and {Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.TerrAdopted}in {?RptTerr})
        else
        ({Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} in {?RptTerr} and {@TimsTerritory} )
          or ({Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} in {?AdoptedTerr}
      and {@AdoptedTerritory} and
{Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.TerrAdopted} in {?RptTerr} )


Embedded formulas in Record Selection:

If you are wondering what the Formula for {@TimsTerritory}  is ......
{Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} =
{Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.TerrAdopted}

and ......
{@AdoptedTerritory} is ..............
{Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr} <> {Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.TerrAdopted}

My question is will this formula take care of the reports Record Selection if I replace the above section with the following.

if {?RptTerr} = "ALL" then true else {?RptTerr} = {Rpt_SalesSummaryAdopted_sproc_MAC_RAMS;1.Terr}

I ask this because when I replaced the record selection I went from 35481 records to 130921 records
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:
Your longer formula has additional filtering so it is doubtful that the 2 are equivalent.

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 is correct. I went ahead and put the results after removal out to testing and will let the users determine if there was a problem. I was told to take the value Adopted Territory out so I did. I guess we will see if the controller was correct in the request.
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.