Count down a column with multiple rows.

Hello,

I'm using the Matrix in SSRS.

I'm trying to display a count of image's on a column that has multiple row's. 
Currently using the following VBA code and Parameter.


Function fun(x)
Dim k As Byte
k = Instr("9876543210", x)
fun = Mid("9876543210", k+k-1, x+x)
End Function

=Code.fun(Count(Fields!ImageId.Value))

I return 

How would I able to return the following

Kind Regards, Richard.


August 27th, 2015 5:52am

Hi Richard, 

According to your description, you want to display "No image" message if no image exists, right? 

In your scenario, you can use IIf() function to return the required message, please refer to the following expression: 

=IIf(Count(Fields!ImageId.Value) = "", "No Image", Code.fun(Count(Fields!ImageId.Value)))

For you requirement, what result do you want the code return? You can change the "x+x" value based on your requirement. 

If you have any question, please feel free to ask. 

Regards,
Shrek Li

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 10:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics