Results 1 to 5 of 5

Thread: Show multiple reports in report view

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    22

    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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    22

    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.

    Name:  Planlijst.PNG
Views: 537
Size:  28.0 KB

    However when i try to show the main report with the subreport in it i get the following error:

    Name:  Error.PNG
Views: 481
Size:  16.5 KB

    The code on the report viewer form is still the same as in my last post.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Show multiple reports in report view

    Did you do as instructed, i.e. did you check the log files for more information?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    22

    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:

    log.txt
    Last edited by nechtmarrie; May 8th, 2013 at 07:59 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width