SSRS MailTo Expression - reporting-services

I have a textbox with the following expression- ="MailTo:example#gmail.com".
I have tried with and without the quotes. With the quotes, I just get the actual text, which is MailTo:example#gmail.com. Without the quotes, I receive an error about using a colon.
What I want to do is hyperlink the email address so that it can be clicked on in the report, and have outlook open. How can I achieve this?
Apparently, the above does not describe my problem enough...let's see if this works...

Right click the textbox and go to Textbox properties, in the Action tab select Go to URL and use the expression you need:
="mailTo:example#gmail.com"
Also if you set the Place Holder Markup Type property to HTML you can use an expression like this:
="<a href=" & CHR(34) &
"mailto:alejandro.zuleta#example.com" & Chr(34) &
">send mail to alejandro</a>"
Which results in a hyperlink to the specified mail address that executes your default E-Mail client to send the mail.
Let me know if this helps.

Related

SSDT using multiple input fields in expression to create hyperlink

I am building an expression for a hyperlink in SSDT but I am trying to build it with 2 field inputs.
Here is what I started with in the expression box and it works.
="http://s1324.com/Report&Car=Toyota&Model=Celica"
Then i substituted Celica for &Fields!Model.Value and that URL worked. (where Fields!Model.Value = Celica)
="http://s1324.com/Report&Car=Toyota&Model="&Fields!Model.Value
Now i am trying to also substitute the word Toyota for a Car value (where Fields!Car.Value = Toyota) but i cant seem to complete the entire correct url
="http://s1324.com/Report&Car="&Fields!Car.Value"&Model="&Fields!Model.Value
Is there a way to use 2 inputs to create a URL?
Thanks
You've missed the ampersands in the middle part. Try this
="http://s1324.com/Report&Car=" & Fields!Car.Value & "&Model=" & Fields!Model.Value
If you put spaces between operators it's easier to read

SSRS Displaying Variable Data in a Page Header Not Displaying on Subsequent pages

I have inserted a page header and added a textbox with the expression =ReportItems!co_MainContact.value. This is the address that I want repeated in each page. For some reason, the address is printed on the first page, but not in the next few pages. Is there a reason why this data doesn't show up? I have a logo and a title in the header page and they're showing up in subsequent pages.
The co_MainContact expression is:
=Fields!co_Address1.Value & vbcrlf + Fields!co_City.Value & ", " & Lookup(Fields!co_ProvinceId.Value,Fields!pc_id.Value, Fields!pc_ProvCode.Value, "Province") & ", "& Fields!co_PostalCode.Value & vbcrlf & "Voice: "&Fields!co_MainContact.Value + " Fax: "& Fields!co_FaxNumber.Value & vbcrlf & "Toll Free: "&Fields!co_PhoneNumber.Value
Report Header properties are default settings and I'm using MS report builder 15.0.19440.0
Without seeing your full report design it's hard to say, if this does not help, please post a screen shot of your full report design, include all grouping as this is usually an important factor.
I would guess you are referencing a textbox that only appears on the first page. References to ReportItems don't work in the same way as referencing Fields.
So I would think you have a few options...
Option 1: Change the header expression
Change the expression in the header to be similar to the expression of the co_MainContact textbox but specify the scope as the dataset.
something like
=FIRST(Fields!co_Address1.Value, "myDataSetName") & vbcrlf + FIRST(Fields!co_City.Value , "myDataSetName") & .... etc... etc
NOTE: the dataset name is case sensitive and must be enclose in quotes.
Option 2: Add a calculated field to your dataset
For a cleaner report you could add a new field to your dataset, either in the dataset query, appending all the relevant columns, or you could add in to the dataset fields as a calculated field (from the dataset properties window).
Either way you will end up with a new column and you can reference that column directly in both the co_MainContact textbox (simply =Fields!myNewAddressColumn.Value) and also in your header. For the header you would use something like =FIRST(Fields!myNewAddressColumn.Value, "myDataSetName")
Hopefully one of these options will do the trick, if not post as much as you can, especially the report design.

SSRS adding hyperlink with field URL

I am trying to add hyperlink with url field into textbox.
"can be accessed at " + <a href=First(Fields!url.Value,"dsScheduleA")>First(Fields!url.Value,
"dsScheduleA");/a>
this one is for expression for value. is this working fine?
You can't add a working hyperlink using HTML - you must use the ACTION property of the textbox.
For the text box, your text expression would be
="can be accessed at " & Fields!url.Value,"dsScheduleA")
Then go to the Action property and select Go to URL and select the URL field.

Opening form from combo box in another form

I have a form called DisplayForm. In that form is a combo box drop down that is at the top of column on the form where a label would usually go. I want to select an item from that drop down menu and use that bit of data to open another form. I have copied an example from the web, changed the names and can't get it to work. Here is the code;
If Not Me.NewRecord Then
DoCmd.OpenForm "AreaForm", _
WhereCondition:="LArea=" & Me.AreaCBDrop
End If
Area is the name of the field in the query that is the recordsource for the form, but when I run it, it opens a msgbox that wants me to enter a peramater value. I also don't understand what the IF is about. I have tried this with and without the if but get the same result. Me.AreaCBDrop has the correct value in it, but the where does not work.
Thanks
Thanks
Your WHERE condition is expecting a text parameter, but you are not supplying the expected format, so it is asking for one.
Surround your Me.AreaCBDrop with single quotes, like this:
If Not Me.NewRecord Then
DoCmd.OpenForm "AreaForm", _
WhereCondition:="LArea='" & Me.AreaCBDrop & "'"
End If

Passing values to an URL in SSRS and opening the URL in a new window

I'm trying to use the following to open a new window while passing some values to the url. I'm new at this so I'm guessing it's something minor.
="javascript:void(window.open('https://website.com/Move/Closeout.aspx?cusid=" & Fields!CustomerID.Value & "&soid=" & Fields!SalesorderID.Value', '_blank'))"
In the report, the link doesn't even appear as a link and when I click on it, nothing happens.
You need to set up the url as a navigation link. So your field expression will simply be Fields!CustomerID.Value then right-click the cell, select Text Box Properties... then Action. Select the Go to URL radiobutton and enter your javascript expression in there:
="javascript:void(window.open('https://website.com/Move/Closeout.aspx?cusid=" & Fields!CustomerID.Value & "&soid=" & Fields!SalesorderID.Value', '_blank'))"
This will turn the displayed CustomerID in the cell into a clickable link.
I also change the Font.Color to Blue to indicate it is a link.