Hi everyone.
I have done SRS for 3 years and have never run across this issue until
today.
I have a simple report.
It takes a parameter called "SalesPerson" (select fullname from
sales_contact)
I use this parameter to get my data back.
ie (select * from sales where salescontact = @.SalesPerson)
That works great.
My boss wants me to add an "All Sales People" item as the 1st in the
dropdown list.
I'm not sure the best way to implement this.
I don't want to make a duplicate report as that is wasteful.
Thanks, JonHi Jon,
Use UNION in your "SalesPerson" dataset.
SELECT 'All Sales People' as fullname , 0 as sort
UNION
SELECT fullname ,1 as sort
FROM sales_contact
ORDER by sort
The sort allows you to bring the 'All Sales People' on top of the list
In your main SQL you need to do a case statement
select * from sales where salescontact = CASE WHEN @.SalesPerson = 'All
Sales People' THEN salescontact ELSE @.SalesPerson END )
hope this helps
On Jan 26, 8:41 am, jonknutsonh...@.yahoo.com wrote:
> Hi everyone.
> I have done SRS for 3 years and have never run across this issue until
> today.
> I have a simple report.
> It takes a parameter called "SalesPerson" (select fullname from
> sales_contact)
> I use this parameter to get my data back.
> ie (select * from sales where salescontact = @.SalesPerson)
> That works great.
> My boss wants me to add an "All Sales People" item as the 1st in the
> dropdown list.
> I'm not sure the best way to implement this.
> I don't want to make a duplicate report as that is wasteful.
> Thanks, Jon|||Are you using 2005? then you can use multi select, so atleast not "All sales
person", you get a word "ALL" on top of the list
so I think that should be ok with you for the selection.. accordingly you
need to change by just including "IN (@.salesperson) in your sql query.
Amarnath
"jonknutsonhome@.yahoo.com" wrote:
> Hi everyone.
> I have done SRS for 3 years and have never run across this issue until
> today.
> I have a simple report.
> It takes a parameter called "SalesPerson" (select fullname from
> sales_contact)
> I use this parameter to get my data back.
> ie (select * from sales where salescontact = @.SalesPerson)
> That works great.
> My boss wants me to add an "All Sales People" item as the 1st in the
> dropdown list.
> I'm not sure the best way to implement this.
> I don't want to make a duplicate report as that is wasteful.
>
> Thanks, Jon
>
No comments:
Post a Comment