1
votes

I have the following request from a client for feature to add to an SSRS report. I'm not sure it's possible to do what he's asking for. I haven't been able to find a way to do this after many Google searches, so I'm asking here - here's what he wants:

  1. We would like a button added below “View Report” to send the report as an excel attachment to the CT Logistics inbox(copied here).
  2. We would like a box added so the PM can enter their name and be CC’d to the sent report email.
  3. The subject line of the email should be the study number “C####” plus “initiation Supplies”.

As far as I can determine, there's no way to add a "Send Email" button as he requests, I can only have the report send email every time it runs. I have no clue how to add a box for someone to enter their name to be CC'd on an email - I don't even know if that's possible. As for the subject line, the study number is part of the data set for the report, so I could put it into a data-driven subscription, but I don't see a way to add an Excel attachment of the report using that method.

Can anyone point me to the way to fulfill the user's requests, or else confirm that what he's asking for can't be done? I'm using VS 2005 and SQL Server 2008 R2 (this is what we have at work, I can't update the versions).

Thanks!

1
This can probably be done with a custom asp.net page that calls the report viewer. It definitely cannot be done with out-of-the-box SSRS functionality.Tab Alleman

1 Answers

0
votes

I think the closest you'll be able to do is the Data-Driven Description to e-mail an Excel report at a given time with the subject and filename (if needed) that includes the study number.

It won't be on demand nor will it be CC'd to any additional people.

Now that I think about it, you could query a table for the person to be CC'd. The table could be populated before run time.

New idea - add a CC parameter to your report with the default as null. When the report is run the first time, it won;t do anything since the parameter is null. When your report is re-run with the parameter, your dataset query populates a table with the CC address and timestamp before running the regular query. Your data-driven subscription runs every 5 minutes and sees the new record in the table and fires using the CC field.

IF ISNULL(@CCPARAMETER, '') <> '' 
  INSERT INTO YourCCTable 
  VALUES (@CCPARAMETER, GETDATE() )

... <Your query>