Displaying single-instance business object data on SSRS
Posted
by Lachlan
on Stack Overflow
See other posts from Stack Overflow
or by Lachlan
Published on 2009-12-14T22:18:52Z
Indexed on
2010/04/08
12:03 UTC
Read the original article
Hit count: 556
I have a SQL Server Reporting Services local (i.e. RDLC) report displayed in a ReportViewer, with two subreports. I am using business objects to populate the datasets. What is the best way to populate single-instance data on my report, e.g. a dynamic title, or a text box that lists a calculated value, not based on the report data?
I am currently displaying data using the following style:
public class MyRecordList
{
string Name { get; set; }
List<MyRecord> Records { get; set;}
}
public MyRecord
{
string Description { get; set;}
string Value { get; set;}
}
I set the datasource to the Records in an instance of MyRecordsList, and they print out find in a table. But adding a textbox and and referring to Name displays nothing. I also tried turning Name into a List, and referring to the first in the list, using:
=First(Fields!Name.Value, "Report1_MyRecordList")
but still nothing is printed on the report.
© Stack Overflow or respective owner