or
var recipientContact = from ro
in
recipientOrg.AsEnumerable()
join rc
in
_db.RecipientContacts
on ro.RecipientOrganizationID equals rc.RecipientOrganizationID
select
new
{
OrgName = rc.RecipientOrganization.Name,
ContactName = rc.FirstName +
" "
+ rc.Surname,
Address1 = rc.Address1,
Address2 = rc.Address2,
City = rc.City.CityName,
Province = rc.Province.NameEnglish,
Country = rc.Country.CountryName,
PostalCode = rc.PostalCode,
Fax = ro.FaxNumber,
Phone = ro.PhoneNumber
};
table5.DataSource = recipientContact.ToList();
private
void
table5_ItemDataBound(
object
sender, EventArgs eventArgs)
{
}
<
telerik:ReportViewer
Name
=
"telerikPersonReport"
Height
=
"275"
/>
public
void
LoadTelericReport()
{
Telerik.Reporting.EntityDataSource entityDataSource =
new
Telerik.Reporting.EntityDataSource();
ReportEntity objectContext =
new
ReportEntity();
entityDataSource.ObjectContext = objectContext;
entityDataSource.ObjectContextMember =
"Events"
;
Telerik.Reporting.Report report =
new
Telerik.Reporting.Report();
report.DataSource = entityDataSource;
Telerik.Reporting.InstanceReportSource reportSource =
new
Telerik.Reporting.InstanceReportSource();
reportSource.ReportDocument = report;
telerikPersonReport.ReportSource = reportSource;
telerikPersonReport.RefreshReport();
}
public
class
ReportEntity
{
Attendance_Tracker ThisData =
new
Attendance_Tracker();
public
ReportEntity()
{
ThisData.Attendances.Load();
ThisData.Attendees.Load();
ThisData.Events.Load();
ThisData.Sessions.Load();
}
public
List<EventType> Events()
{
var AllEvents = from e
in
ThisData.Events.Local
select
new
EventType()
{
EventID = e.EventID,
EventName = e.EventName,
StartDate = e.StartDate,
EndDate = e.EndDate,
count = (from a
in
ThisData.Attendances.Local
where a.Session.Event == e
select a).Count()
};
return
AllEvents.ToList();
}
}
Good morning,
I have successfully been able to add a built report to a Windows Form, but I am having a little trouble getting it to work on a webpage.
I have added the Telerik Report to the webpage, added the Report Source, but I am getting the error
"The source of the report definition has not been specified."
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = new Telerik.Reporting.Examples.CSharp.ListBoundReport();
this.ReportViewer1.ReportSource = instanceReportSource;
}
}