CR XI
SQL Server 2000
I am having problems in using two types of parameters in a report, one date type and one string type.
I want to show one only when it is picked, not both of them.
For my parameter {?Timeperiod} the choices are:
choice 1 "month" - which would return records with an open date in the lastfullmonth
choice 2 "customized range" - which would let the user pick a date range
The {?timeperiod} parameter is defined as a string type.
values are "month" and "customized range"
default value is blank.
allow custom values is false
allow multiple values is false.
allow discrete values is true.
allow range values is false.
I have another parameter {?Date) that is defined as a date type.
(I want to reference this to enable the user to pick a date range.)
default value is blank.
allow custom values is true.
allow multiple values is false.
allow discrete values is false.
allow range values is true.
What I am trying to do is this:
- When the user chooses "month" the record selection references a formula that uses last full month.
- when the user chooses "customized range", the record selection references the {?Date} parameter
so that they can choose a date range.
If I try to do a case statement in the record selection:
select {?Timeperiod}
case "month" : {@Last Full Month}
case "customized range" : {?date}
it tells me that a boolean is needed at the "customized range" statement.
If I try to use an if/then/else,
if {?Time Period} = "month" then {@Last Full Month} else
if {?Time Period} = "customized range" then {?Date}
it tells me that a boolean is needed at the "customized range" statement.
Alternate way to try this:
If I try to use two formulas with case statements (one for the first scenario and the other for the second),
it keeps wanting an "else" after the last "if" when I use
if {?Time Period} = "month" then {@Last Full Month} else
if {?Time Period} = "customized range" then {?Date}
I want to show the month parameter selection or the date parameter selection, not both, because if i do, it
keeps making me fill in the date range even though I select the "month" choice.
I think this can be done, but I am missing something. I hope I have been fairly clear in what I am trying to do.
All help is greatly appreciated.
(Pls forgive if I don't answer right away - I am going on leave for a week)
Thanks in advance.
Rory
SQL Server 2000
I am having problems in using two types of parameters in a report, one date type and one string type.
I want to show one only when it is picked, not both of them.
For my parameter {?Timeperiod} the choices are:
choice 1 "month" - which would return records with an open date in the lastfullmonth
choice 2 "customized range" - which would let the user pick a date range
The {?timeperiod} parameter is defined as a string type.
values are "month" and "customized range"
default value is blank.
allow custom values is false
allow multiple values is false.
allow discrete values is true.
allow range values is false.
I have another parameter {?Date) that is defined as a date type.
(I want to reference this to enable the user to pick a date range.)
default value is blank.
allow custom values is true.
allow multiple values is false.
allow discrete values is false.
allow range values is true.
What I am trying to do is this:
- When the user chooses "month" the record selection references a formula that uses last full month.
- when the user chooses "customized range", the record selection references the {?Date} parameter
so that they can choose a date range.
If I try to do a case statement in the record selection:
select {?Timeperiod}
case "month" : {@Last Full Month}
case "customized range" : {?date}
it tells me that a boolean is needed at the "customized range" statement.
If I try to use an if/then/else,
if {?Time Period} = "month" then {@Last Full Month} else
if {?Time Period} = "customized range" then {?Date}
it tells me that a boolean is needed at the "customized range" statement.
Alternate way to try this:
If I try to use two formulas with case statements (one for the first scenario and the other for the second),
it keeps wanting an "else" after the last "if" when I use
if {?Time Period} = "month" then {@Last Full Month} else
if {?Time Period} = "customized range" then {?Date}
I want to show the month parameter selection or the date parameter selection, not both, because if i do, it
keeps making me fill in the date range even though I select the "month" choice.
I think this can be done, but I am missing something. I hope I have been fairly clear in what I am trying to do.
All help is greatly appreciated.
(Pls forgive if I don't answer right away - I am going on leave for a week)
Thanks in advance.
Rory