0
votes

This is my error and I have read through many of the fixes for this on the site, though none of them seem to address what I am seeing.

I can run my report just fine and the data displays correctly.

My issue is that I am building a hyperlink off of the columns.

I know its one column that is the issue as when I eliminate it from my hyperlink it forms just fine.

My Hyperlink is this: =Fields!websiteURL.Value & "customer.asp?customerId=" & Iif(Fields!isGuidYN.Value="Y","{","") & Fields!customerId.Value.ToString() & Iif(Fields!isGuidYN.Value="Y","}","") & "&loanId=" & Iif(Fields!isGuidYN.Value="Y","{","") & Fields!loanId.Value.ToString() & Iif(Fields!isGuidYN.Value="Y","}","")

if I eliminate the Fields!loanId.Value.Tostring() the link builds without error (but is no longer useful). Have also tried Fields!loanId.Value.Tostring and Fields!loanId.Value (as this is a string value from the db)

I have tried to hardcode the value from the SQL draw that is that field. 'Test' as loanId and the string comes out fine.

The text box that displays the value on the report is fine and the text is normal on the report. So the data is there, its in the field that displays it, but the hyperlink is not built correctly.

Its just building the Hyperlink gives that error.

The entirety of the error is:

[rsRuntimeErrorInExpression] The Hyperlink expression for the textbox ‘textbox10.ActionInfo.Action’ contains an error: Object reference not set to an instance of an object.

This is not a trickle down error as it is the last one and when I remove the value from the hyperlink the report comes out with 0 errors and 0 warnings.

Any insights would be phenomenal.

Thanks

T

2

2 Answers

0
votes

Can you try this expression: =Fields!websiteURL.Value.ToString() & "customer.asp?customerId=" & Iif(Fields!isGuidYN.Value.ToString()="Y","{","") & Fields!customerId.Value.ToString() & Iif(Fields!isGuidYN.Value.ToString()="Y","}","") & "&loanId=" & Iif(Fields!isGuidYN.Value.ToString()="Y","{","") & Fields!loanId.Value.ToString() & Iif(Fields!isGuidYN.Value.ToString()="Y","}","")

and also make sure that you are using all fields names as it is appearing in dataset. Because in ssrs, names are case sensitive.

0
votes

OK this wasn't what I was looking for but the report came through when I did something rather foolish..right in that category of "That can't possibly help but let's try it anyways..."

So originally I had a select statement like..

SELECT ..., loanId, ... FROM ...

When I ran this I got the loanId but it wouldn't parse the value to a string in order to make it a URL. The value appears in the field on the report, but it doesn't bring it across to the URL.

I even did this:

SELECT ... 'Test' as loanId, ... FROM ...

That gave me the URL and the report liked it, but of course its not a valid URL for my purposes.

So I wound up doing this and the report likes it, builds the URL and I have no idea why

SELECT ... loanId, loanId as loanId2, ... From ...

Now the report likes both the loanId field and the loanId2 field parses to the URL correctly.

Sure its ugly. But I spent way too much time trying to figure it out