The symptom is when you add a record hyperlink to a report, it doesn't register as a hyperlink. Clicking does nothing, and your cursor doesn't even change to the little hand icon on mouse over. Generally this means there's something wrong with the hyperlink. You can output that hyperlink to a field and verify that it looks good to you. You can even copy and paste it into your browser to make sure it works.
Assuming that it's a correct hyperlink, it still may not work. And the reason for that is SSRS doesn't do a good job of converting GUIDs to stings. Even if you specify that the field is a string in the XML, it may not convert it properly. So you have 2 options: explicitly convert it to a string in your query, or convert it to a string in the expression editor.
When you use the expression editor, you have 2 options: toString or CStr.
Sometimes SSRS/CRM will inconveniently drop the toString from your hyperlink when you upload the report. I haven't pinned down why this happens, but know it does and you may need to put it back in and upload again. The formula should look something like this:
=IIF(IsNothing(Parameters!CRM_URL.Value), System.DBNull.Value,
Parameters!CRM_URL.Value
& "?ID={" & Fields!contactid.Value.toString & "}&LogicalName=contact")
Alternately, you can use CStr in your formula. SSRS/CRM won't drop this function when you upload the report, but in a few cases it just doesn't work. Again, I don't know why it works in some situations but not others. You may have to fiddle with it. At any rate, the formula should look something like this:
Alternately, you can use CStr in your formula. SSRS/CRM won't drop this function when you upload the report, but in a few cases it just doesn't work. Again, I don't know why it works in some situations but not others. You may have to fiddle with it. At any rate, the formula should look something like this:
=IIF(IsNothing(Parameters!CRM_URL.Value), System.DBNull.Value,
Parameters!CRM_URL.Value & "?ID={" & CStr(Fields!contactid.Value) & "}&LogicalName=contact")
Either way, this should solve the problem of valid hyperlinks not actually working in your field actions.

No comments:
Post a Comment