We have what we believe followed the instruction for wiring a Telerik report to a data table but cannot get it to run.
The report has it's own class lib and the actual method to call it is in a .net website
here is the calling code which produces the datatable with no issues
The source of the report definition has not been specified.
this tool is most frustrating to use...any guidance appreciated
Web interface code
protected void Run_Click(object sender, EventArgs e)
{
Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource();
objectDataSource.DataSource = GetData();
var report = new CallCenterReportLibrary.CSRPerformance();
report.DataSource = objectDataSource;
//Pass to viewer
var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report;
this.ReportViewer1.ReportSource = instanceReportSource;
ReportViewer1.RefreshReport();
}
private DataTable GetData()
{
ReportBO objReportBO = new ReportBO();
ReportBLL objReportBLL = new ReportBLL();
//Campaigns
var campaignCollection = ddlCampaign.CheckedItems;
var campaignList = new StringBuilder();
foreach (var item in campaignCollection)
{
if (item.Checked)
{
campaignList.Append(item.Value + ",");
}
}
//Teams
var teamCollection = ddlTeam.CheckedItems;
var teamList = new StringBuilder();
foreach (var item in teamCollection)
{
if (item.Checked)
{
teamList.Append(item.Value + ",");
}
}
//Agents
var agentCollection = ddlAgent.CheckedItems;
var agentList = new StringBuilder();
foreach (var item in agentCollection)
{
if (item.Checked)
{
agentList.Append(item.Value + ",");
}
}
objReportBO.StartDate = DateTime.Parse(txtStartDate.SelectedDate.ToString());
objReportBO.EndDate = DateTime.Parse(txtEndDate.SelectedDate.ToString());
objReportBO.CampaignId = String.IsNullOrEmpty(campaignList.ToString().TrimEnd(','))== true ? null : campaignList.ToString().TrimEnd(',');
objReportBO.TeamId = String.IsNullOrEmpty(teamList.ToString().TrimEnd(',')) == true ? null : teamList.ToString().TrimEnd(',');
objReportBO.AgentId = String.IsNullOrEmpty(agentList.ToString().TrimEnd(',')) == true ? null : agentList.ToString().TrimEnd(',');
return objReportBLL.LoadCSRPerformanceData(objReportBO);;
I am sorry to hear that you are experiencing issues with our product. There are two options that I would suggest:
1) In 15.1.21.616, we added support for keeping the client session alive in WPF, Windows Forms, and HTML5-based report viewers.
2) You can increase the value of the ClientSharingTimeout property.