I have a report that has four parameter fields. The first one is RegionSelectBy, and it has three static choices: County, Wide Area, and Area. Each of the three static choices has its own parameter field with a dynamic list of values from the data. The user may select one or more counties, wide areas, or areas to report.
Next I have a formula called IncludeOrNot. It looks like this:
select {?RegionSelectBy}
case "County" : if {?RegionCounty}={HomeSalesWithCPIAndRegion.County} then "Yes" else "No"
case "Wide Area" : if {?RegionWideArea} = {HomeSalesWithCPIAndRegion.WideAreaCombo} then "Yes" else "No"
case "Area" : if {?RegionArea} = {HomeSalesWithCPIAndRegion.AreaCombo} then "Yes" else "No"
The selection formula for the report selects all records where IncludeOrNot = Yes.
My intention is to let them select how they want to select their data (by county, by wide area, or by area). Then based on what they select as the 'select by' method, let them select the records appropriate to that choice.
Right now I have all the parameters set to not optional. Which means that even if the user is selecting by County, he has to fill in SOMETHING (doesn't matter what!) for wide area and area. That's confusing for the user, because they are selecting by county, not by area or wide area.
So I tried mking the county, wide area, and area parameters optional. Using hasvalue, I can work around most every scenario except this one. User selects County as the Select By then doesn't fill in anything for the county. The report balks and takes him to the IncludeOrNot formula. Not good.
So what I really need is to make the County parameter conditionally optional. If SelectBy <> County, then it's optional. If SelectBy = County, then it's required.
Ideas? Thanks!
Next I have a formula called IncludeOrNot. It looks like this:
select {?RegionSelectBy}
case "County" : if {?RegionCounty}={HomeSalesWithCPIAndRegion.County} then "Yes" else "No"
case "Wide Area" : if {?RegionWideArea} = {HomeSalesWithCPIAndRegion.WideAreaCombo} then "Yes" else "No"
case "Area" : if {?RegionArea} = {HomeSalesWithCPIAndRegion.AreaCombo} then "Yes" else "No"
The selection formula for the report selects all records where IncludeOrNot = Yes.
My intention is to let them select how they want to select their data (by county, by wide area, or by area). Then based on what they select as the 'select by' method, let them select the records appropriate to that choice.
Right now I have all the parameters set to not optional. Which means that even if the user is selecting by County, he has to fill in SOMETHING (doesn't matter what!) for wide area and area. That's confusing for the user, because they are selecting by county, not by area or wide area.
So I tried mking the county, wide area, and area parameters optional. Using hasvalue, I can work around most every scenario except this one. User selects County as the Select By then doesn't fill in anything for the county. The report balks and takes him to the IncludeOrNot formula. Not good.
So what I really need is to make the County parameter conditionally optional. If SelectBy <> County, then it's optional. If SelectBy = County, then it's required.
Ideas? Thanks!