none
Printing a report withow runing reportviewer (winforms,report parameters) RRS feed

  • Question

  • Hi Experts,

     

    I was wondering if you culd help me.

     

    Visual Basic . Net 2005

    Microsoft.Reporting.WinForms

     

    I need to "feed" a report with report parameters and sending it for printing inside a loop

     

    The code should look like

     

    dim i as integer =0

     

    For i=0 To 20

     

              Dim parameters as ReportParameters()=New ReportParameter(1) {}

              parameters(0)=New ReportParameter ("Param1",Textbox1.text)

              parameters(1)=New ReportParameter ("Param1",Textbox2.text)

             

             SetParameters( parameters)

             PrintReport()

    Next

     

    Private Sub SetParameters (ByVal parameters as ReportParameters)

            'If I use ReportViewer it would look like

             Me.ReportViewer1.LocalReport.SetParameters(parameters)

     

            ' How can I do It without the use of reportviewer

    End Sub

     

    Private Sub PrintReport()

            'How can I send it to the printer in A4 format

    End Sub

     

    Thank you

    Friday, May 18, 2007 7:47 AM