I assume you will always need the year param.
If you do not use it and a user selects say quarter 1, it would select all quarter 1's for all the years in your original data set.
You have the same issue with month param and that is why I did not recommend using a 0 in the year param.
Your original post wanted either a full selected year or a full month of 1 year so I assume the quarter is also for only one year.
Maybe you are limiting your data set to only one year in soem other way?
Under the condition that you have multiple years of data to deal with your select statment should be something like:
({?month}=0 or {?month}=month({table.datefield}))
and
({?Quarter}=0 or {?quarter}=datepart('q',{table.datefield}))
and
{?Year}=year({table.datefield})
If a user select both a month and a quarter and the month is in the selected qurter only the month records will be shown.
IF they pick month that is outside the q then no records would be returned.
your display string would be
'Working Hours In ' +
(
if {?month}= 0 then and {?quarter}=0 then 'year' else
if {?Month} <> 0 then monthname({?month}) else
if {?Quarter} <> 0 then 'Quarter ' + totext({?Quarter},0,'') + ' of '
) + ' ' + totext({?Year},0,'')
Edited by DBlank - 08 Aug 2012 at 7:23am