I am using the needdatasource event on the subreport to get data:
Private Sub TimesheetParityBreakdownReport_NeedDataSource(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.NeedDataSource
Dim item As Telerik.Reporting.Processing.ReportItemBase = TryCast(sender, Telerik.Reporting.Processing.ReportItemBase)
Dim dataRow As DataRow = DirectCast(item.DataObject.RawData.row, DataRow)
Dim oDataSource As New System.Web.UI.WebControls.ObjectDataSource
oDataSource.SelectMethod = "SafeTelerikReportNewTimesheetParityBreakdown"
oDataSource.TypeName = "SafeTelerikReportWS.SafeTelerikReportService"
Dim session As Guid
session = dataRow("SessionID")
oDataSource.SelectParameters.Add("SessionID", session.ToString)
oDataSource.SelectParameters.Add("DivisionRef", dataRow("DivisionRef"))
oDataSource.SelectParameters.Add("DepartmentRef", dataRow("DepartmentRef"))
oDataSource.SelectParameters.Add("ToDate", dataRow("ToDate"))
oDataSource.SelectParameters.Add("NoOfWeeks", dataRow("NoOfWeeks"))
oDataSource.SelectParameters.Add("PersonnelRef", dataRow("PersonnelRef"))
oDataSource.SelectParameters.Add("ClientRef", dataRow("ClientRef"))
oDataSource.SelectParameters.Add("JobDescription", dataRow("JobTitle"))
oDataSource.Select()
oDataSource.DataBind()
Me.DataSource = oDataSource
End Sub
the parameters are being passed to the subreport are stuck on the first row data values from the mainreport.
ie I have a 100 different rows in the main report and the subreport comes out eveytime based on rows 1 values.
i need each subreport to be based on the each detail items of the main report
I also need to know how to run the subreport ondemand, so that it automatically doesnt call the subreport 100 times for example.
I have various field on the main report which i can use to show subreport. I'd like it so when i click to open one subreport, any open ones should close.
using Q2 2010 reporting
Thanks