Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report subtotal base by MSSQL Login security

Status
Not open for further replies.

fredong

IS-IT--Management
Sep 19, 2001
332
0
0
US

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.
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top