Hey
I'm trying to use the ReportViewer Control in Visual Studio 2008 but I'm having problems with viewing the "Smart Tag Panel". The little triangle which should be in the top right corner is not shown. I think the problem is that I can't select the ReportViewer in the Designer in Visual Studio. How do I fix this?
Otherwise i tried to sholved the problem by filling the ReportViewer with data programatically but i also have some problems here. I get an message, which is shown inside the ReportViewer at rumtime:
A datasouce instance have not been supplied for the data source ...
I'm using this code:
private void LoadEmployeeTimeregistrations(string employeeNumber)
{
_employeeTimeregistrations = new List<TimeregistrationData>();
EntityCollection<TimeregistrationsEntity> employeeTimeregList =
_client.TimeRegistrations().GetTimeregistrations(
KRWindPcClassesLibrary.Properties.Settings.Default.ProjectNumber,
employeeNumber, false, null);
if (employeeTimeregList != null)
{
foreach (var timereg in employeeTimeregList)
{
_employeeTimeregistrations.Add(new TimeregistrationData
{
Day = timereg.Time.ToShortDateString(),
TotalHoursPresentation = 8.ToString()
});
}
}
ReportDataSource reportDataSource = new ReportDataSource("Data", _employeeTimeregistrations);
reportViewer2.LocalReport.DataSources.Clear();
reportViewer2.LocalReport.DataSources.Add(reportDataSource);
reportViewer2.LocalReport.Refresh();
reportViewer2.RefreshReport();
}