ReportDr00
IS-IT--Management
Hello,
I have two parameters ID and Name and i set default value to be one space and i would like to return results based on values entered for parameters, but user can only enter value for one parameters then the report should ignore second parameter and return results only based on one parameter. If user did not enter value for any parameter then report should ignore parameters and return all results.
I hope i am making sense
For example,
I have ID as param 1 and Name as param 2 then user enters value for ID and nothing for param 2
the sql query should be
select id, name, dob, ssn, age from patient where id=?ID
if Name param is entered and ID is null then
sql query should be
select id, name, dob, ssn, age from patient where name=?name
If both param values are entered then
select id, name, dob, ssn, age from patient where ID = ?ID and Name =?Name
If both param values are not entered then
select id, name, dob, ssn, age from patient
I appreciate you feedback.
Regards
I have two parameters ID and Name and i set default value to be one space and i would like to return results based on values entered for parameters, but user can only enter value for one parameters then the report should ignore second parameter and return results only based on one parameter. If user did not enter value for any parameter then report should ignore parameters and return all results.
I hope i am making sense
For example,
I have ID as param 1 and Name as param 2 then user enters value for ID and nothing for param 2
the sql query should be
select id, name, dob, ssn, age from patient where id=?ID
if Name param is entered and ID is null then
sql query should be
select id, name, dob, ssn, age from patient where name=?name
If both param values are entered then
select id, name, dob, ssn, age from patient where ID = ?ID and Name =?Name
If both param values are not entered then
select id, name, dob, ssn, age from patient
I appreciate you feedback.
Regards