Hi I have a list that comes into the report viewer demo that has 48 items i am passing it two a report view. But when I look at the report viwer it is comming up blank.
public
partial
class
BoxReportBatches : Telerik.Reporting.Report
{
private
List<BoxReportObject> _list;
public
BoxReportBatches()
{
//
// Required for telerik Reporting designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public
BoxReportBatches(List<BoxReportObject> _dataSource)
{
_list = _dataSource;
this
.DataSource = _list;
}
}
And here is my reportviewer window
private
List<BoxReportObject> _list;
public
ReportViewer(List<BoxReportObject> list)
{
InitializeComponent();
_list = list;
}
private
void
ReportViewer_Load(
object
sender, EventArgs e)
{
// var exeFolder = @"\\server02\sage\CustReports";
//var exeFolder = @"C:\Program Files (x86)\Sage\Sage200\Reporting\";
//string reportPath = Path.Combine(exeFolder, @"BoxReport.rdlc");
// Clipboard.SetText(exeFolder);
BoxReportBatches report1 =
new
BoxReportBatches(_list);
// perform additional operations on the report object if needed
Telerik.Reporting.InstanceReportSource instanceReportSource =
new
Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report1;
this
.reportViewer1.ReportSource = instanceReportSource;
}
My Box Report Class is
public
class
BoxReportObject
{
public
DateTime ProductionPlanWeekStarting {
get
;
set
; }
public
DateTime ProductionPlanWeekEnding {
get
;
set
; }
public
string
BatchNumber {
get
;
set
; }
public
string
BoxRef {
get
;
set
; }
public
string
BoxName {
get
;
set
; }
public
decimal
Qty {
get
;
set
; }
}
You can also see here the properties of my report viewer.