Question

I have a report embedded in a web application that works fine but I need to make a tweak to it. Right now the report basically will dump all the rows from a view, I have some filters set up but I have disabled them to simplify this and get this working. I spent all day yesterday trying to get this to work correctly, attempting many different combinations of things. The end goals is to take a set of data and display it as a comma separated list within the same row that the data belongs to.

My data is a list of projects, each project can have multiple personnel associated with it, instead of having a new row for each person we want all the people in one column separated by commas that belong to the project. A trivial task in SQL.

SELECT dbo.APM_Project.Code, dbo.APM_Project.Title, 

              (STUFF((SELECT(', ' + vi.NameFirst)
              FROM view_OrganizationPerson vi
              JOIN APM_Project as p ON vi.ProjectId = p.Id
              WHERE vi.ProjectId = APM_Project.Id
              AND vi.Role = 'Principal Investigator'
              AND vi.Status = 'Active'
              FOR XML PATH('')), 1, 2, '')) AS PI_


FROM         dbo.APM_Project 

Also I have tried the SUBSTRING method of producing the comma separated list, all of these methods work great when I run the SQL script, they also work when I preview the data from my dataset in visual studio so something must be right. I get the results I want however when I run the application, I get no data in the column using the expressions of

=Fields!PI_.Value

or

=First(Fields!PI_.Value, "DataSet1")

So I'm not entirely sure where to go from here. This seems like it should be a pretty easy task, also when I run the expression

=Fields!PI_.IsMissing

it comes back true, so something is being lost at runtime and I just can't figure out what it could be.

All other data of the project is present within the text boxes, just the PI_ column is left blank.

Question is:How do you display a CSV list of data in one column of a row of data in an RDLC file?

Was it helpful?

Solution

Turns out this is valid. I needed to update the .aspx page with the changes made to the data adapter itself since I changed the data set.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top