Results 1 to 2 of 2

Thread: How to use single MDI Child Form for all Crystal reports

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    12

    How to use single MDI Child Form for all Crystal reports

    Hello all,
    I have MDI Application in which i am displaying crystal reports.
    For that i have created a mdi child form. in which ReportViewer control is used to display reports.
    Now in my app, there would be many reports. so, do i need to create that many chile mdi forms and add reportviewer in all these forms?
    or else can i use single form and reportviewer to disaply all forms?
    and if yes.... how?
    because it is MDI application, it wont allow me to open multiple instances of single form. but, user may want to view multiple reports without closing other.
    any idea?
    Thanx.......!

  2. #2
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: How to use single MDI Child Form for all Crystal reports

    You can open multiple instances of a single form in MDI form. Below is some sample code where Form3 is a MDI parent form and Form1 is a MDI Child form.

    Code:
    Public Class Form3
    
        Private Sub Form3_Load( _
            ByVal sender As System.Object, _
            ByVal e As System.EventArgs _
        ) Handles MyBase.Load
    
            Dim frm1 As New Form1
            frm1.MdiParent = Me
            frm1.Show()
    
            Dim frm2 As New Form1
            frm2.MdiParent = Me
            frm2.Show()
        End Sub
    
    End Class
    To show multiple reports, just create a single form with ReportViewer control, create multiple objects of this form and provide the necessary details to load the reports. That's the way how it should be done.

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