What is the most efficient way to do this......
I have an invoice table that the users need to query in about any combanation under the sun!
example filter based Invoice# or *all,Customer # or *all, salesrep# or *all, region# or *all, etc now these filters can be actual value or all, in any combo, example all invoice# for region a, or 123(customer) in a. I would also like to give the user the parm for subtotal selection(groupBY) I will alway be summing on the invoice amount. Following the above example 123 invoices in reagion A, subtotaled @ date.(I'm already passing date range as a parm)
I was thinking I could pass the user selected values to a stored procedure for the where clause, and order by, but not sure how efficient that would be, and need a code example for the *all situation. Any help would be greatly appreciated. Thanks in advance.