November 28, 2011 at 6:19 am
Hello,
I am currently building a suite of reports for my organisation using SSRS 2008. I'd like to get user feedback on the new reports and considered that it would be nice to have the user click a link on a report which then sends an email to me, much like an HTML form. Although the Text within a Textbox can use HTML markups, the report still renders as static (ie. it displays the data formatted according to the HTML tags, but doesn't provide the fields for user data entry or Send functionality).
I then considered using User Parameters as data entry fields and applying a code module to the report that Sent the parameters as email text. I'm not even sure if that is possible (and it certainly won't look as nice).
Has anyone else attempted/achieved this? Anyone have any ideas how it could be done?
Unfortunately I don't have the option to request our intranet developers provide a URL for this purpose, as they are based off-site as part of a much larger organisation, of which ours is only a small part.
November 28, 2011 at 6:50 am
I'm not sure if the "code" approach would work, but it's worth a try.
Another solution is a bit of a trick.
Add a parameter in the procedure that supports the report with a default that is ignored. Say @sendMail BIT = 0, and nothing happens in the procedure with a value of 0. If a 1 value is passed in you call the mail method you prefer (a job or sql mail etc...) then after that, the standard report results are returned, or redirected to another report thatdisplays the "Sent mail" notice.
Bottom line, make your logic work with BOTH SSRS and SQL at the same time.
[EDIT]
0 = both report and proc perform as normal
1 = proc sends email AND returns data as normal and the report performs as normal
OR
1 = proc sends email AND returns nothing/sendmail status and the report redirects/displays sendmail status
[/EDIT]
Make sense?
FYI, you can conceptually design a dashboard with many commands available via a report.
🙂
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 28, 2011 at 7:29 am
Do your users have email applications on their desktop?
If so, why not just use a mailto: action?
Go into the textbox properties, select Action, Go to URL and enter an expression - something like this:
="mailto:foo.bar@email.com?subject=My Report Feedback for " & Globals!ReportName
This will open an email ready for them to write feedback, with the subject pre-populated with the report name.
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
November 28, 2011 at 7:32 am
mister.magoo (11/28/2011)
Do your users have email applications on their desktop?If so, why not just use a mailto: action?
Go into the textbox properties, select Action, Go to URL and enter an expression - something like this:
="mailto:foo.bar@email.com?subject=My Report Feedback for " & Globals!ReportName
This will open an email ready for them to write feedback, with the subject pre-populated with the report name.
And then there's that. :hehe:
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 28, 2011 at 9:33 am
Both excellent responses. Thank you. I tried the "mailto:" approach and it works very nicely but I probably can't use it as a solution because we actually use web based mail here. Some users (like myself) have this linked to a desktop email app, where this code worked, but for the others it won't :crying:
I'll try the method of sending it from within the SPROC. Thanks very much.
November 28, 2011 at 9:42 am
domciccone (11/28/2011)
Both excellent responses. Thank you. I tried the "mailto:" approach and it works very nicely but I probably can't use it as a solution because we actually use web based mail here. Some users (like myself) have this linked to a desktop email app, where this code worked, but for the others it won't :crying:I'll try the method of sending it from within the SPROC. Thanks very much.
Well, I actually re-read your question text and saw the "WITHIN an SSRS" specification this time. 😀
One method is SQL Mail A.K.A. "EXEC msdb..sp_send_dbmail".
Now this wouldn't allow the user to provide any input/feedback, it would just send a predefined email. You could however, provide options as links. One passing a "I agree" parameter and one passing a "I disagree" etc..
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgViewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply