Show multiple reports in report view
Hello,
I ame currently working on a planning software project.
I have created a report to print orders per day.
However i would like to add more reports to the same report view on different pages.
Is this possible?
This is the current code i ame using on the form containing the report view:
Code:
Public Class frmPrint
Dim Datum As Date
Public Sub New(ByVal Datum As Date)
InitializeComponent()
Me.Datum = Datum
End Sub
Private Sub Print_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'dsPlanlijst.Planlijst' table. You can move, or remove it, as needed.
Me.PlanlijstTableAdapter.Fill(Me.dsPlanlijst.Planlijst, Datum)
Me.ReportViewer1.RefreshReport()
End Sub
End Class
Re: Show multiple reports in report view
One ReportViewer can only display one report at a time, but that report can contain sub-reports. That's an issue for your report design though, not for your form containing the ReportViewer control. If you don't want to create sub-reports and then have the main report load them, you'll need to use multiple ReportViewer controls or else change the report that it's displaying.
2 Attachment(s)
Re: Show multiple reports in report view
Okay so i made a main report and placed a subreport inside of it.
When i show the subreport itself in the Report viewer it gets displayed with no problem.
Attachment 99837
However when i try to show the main report with the subreport in it i get the following error:
Attachment 99835
The code on the report viewer form is still the same as in my last post.
Re: Show multiple reports in report view
Did you do as instructed, i.e. did you check the log files for more information?
1 Attachment(s)
Re: Show multiple reports in report view
Found the logs but i cannot realy determine what exactly is wrong from it.
This is what the log contained:
Attachment 99843