views:

1103

answers:

1

Hi,

I have a reportviewer and i want a field to act as a hyperlink. The hyperlink must look like: page.aspx?id=1 But how do i achieve this?

I have entered in the properties window, navigation tab, radio "Jump to URL": page.aspx?id=sum(Field!field.value)

This doens't work :(

What do i have to do to get this work?

Thnx in advance

  • Martijn

PS: I also have EnableHyperlinks set to true;

+1  A: 

Your expression under "Jump to URL" should be:

="page.aspx?id=" & sum(Fields!field.value)

Although I see 2 potential issues with that. First of all, if I remember correctly, the URL must be an absolute path (e.g. http://www.test.com/page.aspx). Secondly, I'm not sure why you're summing on a field. If you mean to only get the "current" value of some field, you don't need the aggregate function, but you have to be sure you are inside a control that repeats data for each row of a dataset, e.g. a detail row of a table.

Liron Yahdav
Thnx, but when i remove the aggregate function, the value isn't displayed. Maybe it's because id is an int and not a varchar?
Martijn
it doesn't matter what id is because you're just concatenating strings there. I was just saying the aggregate is not required (depending on what part of what control you're in).
Liron Yahdav
Also you may need to cast that field value to a string using CStr().
Liron Yahdav