Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS 2008 Report - Hyperlink on Name - After Clicking - Open Outlook Mail with Subject and Body Expand / Collapse
Author
Message
Posted Thursday, April 10, 2014 4:43 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, September 1, 2015 11:46 AM
Points: 24, Visits: 145
Hello,

After reading the subject of this post, i think you got a picture of what i am going to do.

I have a report and one of the column is Planner. It displays the name and that name should be hyperlinked and when i click that, outlook mail should open and this Planner name should be in "To" list.

I did it using "MailTo:"

Now the added requirement is, after clicking name in report, outlook mail should open with Subject and the data should be in the body of the email. After some research, i did it with below code.

="MailTo:" & Fields!Email.Value & "?Subject=The SKU and Market " & "&Body=Hello Team, " & VBCRLF & VBCRLF & "SKU: " & Fields!sku.Value & VBCRLF & "Country: " & Fields!countryname.Value & VBCRLF & Blah Blah Blah..

The problem is, in the above code if i add up to 8 columns, then the hyperlink is working. If i add 1 more column (more than 8) and deploy the report and when i click the hyperlinked name, outlook doesn't open. I can see processing symbol on the report tab revolving for more than 15 min and i would stop the processing. If i modify the expression to 8 columns and deploy the report, hyperlink will open the outlook with data. More than 8, it dies.

Is there any specific reason for this. Is there any conditions or anything i am missing. Do we have any limit for Fields or Parameters in the expression. Please let me know.

Thanks,
SK
Post #1560664
Posted Thursday, April 10, 2014 10:20 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:50 AM
Points: 14,469, Visits: 38,082
i don't think it's the number of fields, i suspect it is the max length of a mailto link command; you are hitting the limit.
paste the string in a decent text editor and see how long the working vs non working link is.


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1560704
Posted Friday, April 11, 2014 11:25 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, September 1, 2015 11:46 AM
Points: 24, Visits: 145
Hello Lowell,

Thanks for the reply.

Yes i am hitting the limit. The limit is around 308.

Looking to work on some VB.Net code and generate the email..

--
SK
Post #1561077
Posted Tuesday, January 5, 2016 10:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 8, 2016 9:53 AM
Points: 1, Visits: 35
I'm using this, its great and works! But is there any way to list all 5 records that exist for this dataset instead of FIRST or LAST? This is a report that will run 1x per week, so there can be multiple records for each user and I'd like to like them in the email. The txt.1 field will have mulitple occurrences.

="MailTo:me@wn.com" & "?Subject=My Held Time " & "&Body=Hello Team, " & VBCRLF & VBCRLF & "SKU: "& First(Fields!employee_code.Value, "TmHeldEmail") & VBCRLF & "Country: " & first(Fields!txt1.Value, "TmHeldEmail")

Thank you for your help,
Mary
Post #1749747
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse