My suggestion is you create a stored procedure. Inside that stored procedure you return data based on stored procedure parameter and your report viewer you execute that sp. For example
create proc myproc
(
@id int
,@title
)
as
begin
if isnull(@id,'') == '' and isnull(@number,'') begin
select all * from MyTable;
return
end
else begin
end
end
Let me know if you understand my solution.