×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Report subtotal base by MSSQL Login security

Report subtotal base by MSSQL Login security

Report subtotal base by MSSQL Login security

(OP)

I have a report with the fields of Salesperson, unitprice, Qty, and total. Currently, the report shows all Salespersons sales subtotal and a grand total. I need to modify the report based by the saleperson MSSQL login name that will only show their indivdual subtotal and the Sales Manager should see all Salespersons sales subtotal and a grand total. Please advise. Thanks.

P.S. The Salesperson MSSQL login name has the same name in  the Salesperson field.

RE: Report subtotal base by MSSQL Login security

You might add something to the where clause like:

table.salesperson = suser_sname()

You may have to strip the domain name out depending upon your configuration.

This assumes that you mean SQL Server when you say MSSQL.

-k

RE: Report subtotal base by MSSQL Login security

(OP)
I am using a store procedure instead of linked tables and I placed this statement
{sp_SAles;1.SaleReport} = suser_sname()  in Report/Edit Selection Formula/ both record or Group and it did not work.

what do you mean by "You may have to strip the domain name out depending upon your configuration ?"


Please advies. Thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close