Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi Everyone,

I'm using VB.Net 2012 and Telerik Reporting V:6.1.12.611. My question is, How to call all reports to display in Master Report using SubReport?

I'm having a problem of creating Master Report in order to view all my report within a subReports. I retrieved the information from different tables and send to datagridview in order manipulate the data once I done send to Generic List contains a series of CLASS objects. To View one report works 100%, but when I try to used sub-report to call a report nothing appear on the report. I created empty dataset link to the CLASS and LIST OF works perfect only SubReport and configuration & Parameters which is failing me.

I try this code is not displaying data within a subReport
VB
Dim rpt As New rptMasterReport()
'retrieving data from the database and send data to Generic List contains a series of CLASS objects
setMonthlyTransReport()
Dim subRpt As New Telerik.Reporting.SubReport()
Dim rptSource As New Telerik.Reporting.InstanceReportSource()
rptSource.ReportDocument = rpt
rptSource.Parameters.Add(New Telerik.Reporting.Parameter("R1", "=Fields.R1"))
subRpt.ReportSource = rptSource
'bind datasource with Generic List contains a series of CLASS objects
rpt.DataSource = lstDailyTicketsRevenue
' Assigning the report to the report viewer.
frmReportViewer.ReportViewer1.ReportSource = rptSource
                          
' Calling the RefreshReport method for WinForms application.
frmReportViewer.ReportViewer1.RefreshReport()
'call form viewr
frmReportViewer.Show()


Any Help will be appreciated.
Thanks!
Posted
Updated 29-Oct-14 2:17am
v2

1 solution

Try this something like this:

var subReport = new YourSubReport();
var subReportItem = MasterReport.Items.Find(typeof(SubReport), true)[0] as SubReport;
subReportItem.ReportSource = new InstanceReportSource { ReportDocument = subReport };
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900