Page 1 of 1

Help with query parameters (display all)?

Posted: Mon Mar 17, 2008 11:35 pm
by Ajax
I made a report that shows employees. (select fullname from emp where emp.id=@emp) [Parameter @emp = cbxEmp.SelectedKey]
I added a form with criteria (lookup box that fills with employees)
select an employee and report displays one (2 data connection 1 for rpr with param and one for filling lookup)
How do I display all employees ?? If I have two button OK and Cancel on cancel If display all employees?

May be this is simple :-(

Thanks in advance for help.

Help with query parameters (display all)?

Posted: Tue Mar 18, 2008 2:05 am
by Vital
You can use following way:

1. Change your query to "select fullname from emp where emp.id=@emp or emp.id>emp2)
2. Set default value of emp2 to very big or example: 10000000000000
3. If you need show all items set emp2 to 0.


Thank you.

Help with query parameters (display all)?

Posted: Tue Mar 18, 2008 2:33 am
by Ajax
Thanks for reply.Actually had managed to do it.Will post my solution too.