This question is locked. New answers and comments are not allowed.
Hi,
I have a Report with a table
With the parameters I'm testing with, my data call returns 17 rows of order objects. Binding directly to the table datasource gives 17 rows as expected. The report has a footer that relies on the same dataset and setting the report dataset causes the table data to repeat. Instead of one page with 17 rows, it becomes 18 pages with the same 17 rows reapeated on each page.
I tried setting the data source on the table's NeedDataSource event, and it ran 18 times.
I'm currently setting the table datasource in the report NeedDataSource.
This gives proper grid, no footer:
I have a Report with a table
With the parameters I'm testing with, my data call returns 17 rows of order objects. Binding directly to the table datasource gives 17 rows as expected. The report has a footer that relies on the same dataset and setting the report dataset causes the table data to repeat. Instead of one page with 17 rows, it becomes 18 pages with the same 17 rows reapeated on each page.
I tried setting the data source on the table's NeedDataSource event, and it ran 18 times.
I'm currently setting the table datasource in the report NeedDataSource.
This gives proper grid, no footer:
this.OrderDetailsTable.DataSource = SupplyReplacementFacade.GetOrdersByCompanyID(newAndPendingOnly, patientFilter, startDate, endDate);
This gives 18 pages of grid with proper footer:private void OrdersDetailReport_NeedDataSource(object sender, EventArgs e)The same thing happens when you set the datasource in the needs datasource event.
{
string authToken = (string)this.ReportParameters["AuthToken"].Value;
bool newAndPendingOnly = (bool)this.ReportParameters["NewAndPendingOnly"].Value;
DateTime startDate = (DateTime)this.ReportParameters["StartDate"].Value;
DateTime endDate = (DateTime)this.ReportParameters["EndDate"].Value;
PatientSearchType patientFilter = (PatientSearchType)(int)(long)this.ReportParameters["PatientFilter"].Value;
if (SRServicesFacade.VerifyAuthentication(authToken, SERVICE_NAME, SERVICE_VERSION))
{
//TODO: Change this for a regular GetCompanyInfo call when the change to store the company info happens
this.txtCompanyName.Value = CompanyManagementFacade.GetCompanyName();
this.DataSource = SupplyReplacementFacade.GetOrdersByCompanyID(newAndPendingOnly, patientFilter, startDate, endDate);
this.OrderDetailsTable.DataSource = this.DataSource;
//this.OrderDetailsTable.DataSource = SupplyReplacementFacade.GetOrdersByCompanyID(newAndPendingOnly, patientFilter, startDate, endDate);
}
}
private void OrderDetailsTable_NeedDataSource(object sender, EventArgs e)
{
if (((Telerik.Reporting.Processing.Table)(sender)).DataSource == null)
((Telerik.Reporting.Processing.Table)(sender)).DataSource = Report.DataSource;
}
How do I set the report datasource, so that I get the page footer information, and set the table datasource so that it has one page of 17 rows?
Thank you for your help,
James Trimmier