Wednesday, March 21, 2012

Getting second row in a data source

Hi,

I'm generating a report where 3 photos can be shown on a report if there are 3 photos in our data source.

they are layed out with the main photo on the left, and the other 2 photos on top of each other on the right.

The dataset that is returned from the query has a column called PhotoURL and each photo is a row of the returned dataset

I have inserted three images on the report


The first image I set the value to be =First(Fields!PhotoURL.Value, "Image")

How do you get the second image to have a value of the second row of the dataset, I mean there is no Second function, or movenext that I can see.

The same applies with the third image.

Thanks in advance


Auschucky

Hello Auschucky,

The First function is an aggregation function, which is not suitable for your images-issue.

When the dataset is returning a number of rows, you have to use a list or table on the report to get all rows (images) on the report. However, this doesn't match your report design.

If the dataset always contains one, two or three images, I suggest to change the select statement to return one row with three url fields. You can attach these fields to your images on the report.

No comments:

Post a Comment