Hello,
My team is very excited to move into Telerik Reports, however we have first been trialling the software and came accross an issue that we are unable to solve. Unfortunately we're on a tight deadline, and would sincerely appreciate any prompt responses.
[See Sample Project, Code & screenshot: http://www.addeight.net/telerik-issue.zip]
We are having trouble binding a sub report based on repeating datafrom a parent (master) report. What we need to be able to do is have a masterreport that repeats SolutionIDs (the primary key), and sub reports (which holdall the totals/information based off a single SolutionID). I cannot useFilters, as the data being returned in the sub reports is complicated.
We have seen these articles as references, and have tried (to our knowledge)everything in them:
http://www.telerik.com/documents/TelerikReporting-LearningGuide.pdf
http://www.telerik.com/ClientsFiles/product.videos/28/
Asyou can see by the screenshot attached (Screenshot.png in root of zip file), we are close. We have used the following code
Public Sub New() |
InitializeComponent() |
|
'bind the master's datasource |
Dim cmdMaster As New SqlCommand("SELECT * FROM Solutions WHERE CompanyID=@CompanyID", cn) |
cmdMaster.Parameters.AddWithValue("@CompanyID", 10) |
Dim daMaster As New SqlDataAdapter(cmdMaster) |
Dim dt As New DataTable("Solutions") |
daMaster.Fill(dt) |
|
Me.DataSource = dt |
Me.DataMember = "Solutions" |
End Sub |
|
Private Sub SolutionDetails_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles SolutionDetails.NeedDataSource |
Dim item As Telerik.Reporting.Processing.ReportItemBase = TryCast(sender, Telerik.Reporting.Processing.ReportItemBase) |
Dim dataRow As DataRowView = DirectCast(item.DataItem, DataRowView) |
Dim adapter As New SqlDataAdapter("SELECT * FROM Solutions WHERE ID=@SolutionID", cn) |
adapter.SelectCommand.Parameters.AddWithValue("@SolutionID", dataRow("ID")) |
|
SolutionDetails.ReportSource.DataSource = adapter |
|
Test_SolutionDetail1.Debug = dataRow("ID") |
'Me.DataSource = adapter |
End Sub |
Again, we need to have the sub report on each SolutionID, and we need to be able toquery data based off that SolutionID in the sub report.
We sincerely appreciate any help in advance, and cannot stress the tight deadline we are working with enough. If you can help, we are more than happy to compensate you for your time!
Cheers!