How can I create and email a data-driven subscription for each collaborator using SSRS?

Victor Pimentel 20 Reputation points
2023-10-30T19:49:51.7566667+00:00

Hi, I need help please.

Currently, I have a (fictitious) report for each member of my sales team. When I create a data-driven subscription and send it to each team member's email, instead of everyone receiving their own report, everyone receives everyone else's report.

SS_SSRS5

My goal is that if my team consists of 10 people, each person will individually receive their own report in PDF format. I already have the report published in SSRS (version 15.0.1102.1084) and it is separated by ID, name, etc., and email for each person.

Could you please guide me on how I can set this up so that each team member receives only their own report?

Please refer to the following information:

https://learn.microsoft.com/en-us/sql/reporting-services/create-a-data-driven-subscription-ssrs-tutorial?view=sql-server-ver16

https://learn.microsoft.com/en-us/sql/reporting-services/create-a-data-driven-subscription-ssrs-tutorial?view=sql-server-ver16#create-a-data-driven-subscription-ssrs-tutorial

I extract information from an SP:

ALTER PROCEDURE [dbo].[GetProviders]. AS BEGIN SELECT [IDProvider] ,[Name] ,[Contact] ,[Phone] ,[Email] FROM [Suppliers].[dbo].[Suppliers] END

SS_SSRS

In visual studio (version 2022):

I added to the report a list, in the list I added text boxes and some with expressions, then a table. At the end there is one report per co-worker, in total 10, but when I make the subscription those 10 reports are sent to each co-worker and I need that each co-worker receives only the report that corresponds to him.

SS_SSRS2

SS_SSRS3

In SSRS I have changed the parameters:

SS_SSRS4

I have tried to change the SP of sql, also add groups in visual studio and read several ways to make a subscription, but so far without the effect I am looking for.


SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
Developer technologies Visual Studio Other
SQL Server Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-10-31T01:53:38.25+00:00

    Hi @Victor Pimentel

    If you want to get different information based on different users, then you need to create parameters in the report for filtering.

    For example, if you add a condition "where Email in (@EmailPara)" to the query in the report, this will create a parameter "EmailPara" through the field email and filter the report results through the parameter.

    Then the parameters section will appear on the subscription page. In the EmailPara field, select Get value from dataset. In Value, select Email.

    This part of setting parameters also has steps in the tutorial, you can check these steps carefully: https://learn.microsoft.com/en-us/sql/reporting-services/lesson-2-modifying-the-report-data-source-properties?view=sql-server-ver16#bkmk_add_reportparameter.

    If the answer is helpful, please click Accept Answer and Up-Vote for the same. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.