none
I am working on rdlc reports in VS2010 in Framewor 2.0 RRS feed

  • Question

  • Hi ,

    I have developed one report PaymentRecepit.rdlc , now I am unable to view the report though the Report viewer is available in the system( Microsoft Report Viewer Redistributor 2008  ). I have designed the Report but unable to view rather don't have much idea on how preview the report in the application ,so that user can view and then print the same.

    Please suggest , I have just got few code from internet but unable to fully map if it works, but I am unable to know how to do it could you please help with some code snipped.

    Kindly find below my code :

       Dim rptable As DataTable = New DataTable("receipt")
    
            rptable.Columns.Add("PaymentReceiptNo")
            rptable.Columns.Add("dtofPayment")
            rptable.Columns.Add("paymentamount")
            rptable.Columns.Add("ConsumerNo")
            rptable.Columns.Add("BillNo")
            rptable.Columns.Add("MeterNo")
            rptable.Columns.Add("PaymentType")
            rptable.Columns.Add("ChequeNo")
            rptable.Columns.Add("ChequeDate")
            rptable.Columns.Add("BankName")
            rptable.Rows.Add(lbl_ReceiptNo.Text, lbl_dtofPayment.Text, lbl_Amount.Text, lbl_Value_CNO.Text, lblPaymentBillNo.Text, lblMeterNo.Text, PymentType.SelectedValue, TxtBox_ChequeNo.Text, Date_Cheque.Text, ComboBoxBankName.Text)
    
    
            ' Create a DataSet. Put both tables in it.
            'Dim ds As New DataSet
            paymentds.Tables.Add(rptable)
    
            Dim reportviewer1 As New ReportViewer
            reportviewer1.RefreshReport()
    
            reportviewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
            reportviewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\PaymentRecepit.rdlc"
            reportviewer1.LocalReport.DataSources.Clear()
            reportviewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("receipt", rptable.TableName()))
            reportviewer1.DocumentMapCollapsed = True
            reportviewer1.RefreshReport()

    • Moved by Youen Zen Wednesday, April 17, 2013 6:13 AM From Visual Basic
    Tuesday, April 16, 2013 12:45 PM

Answers

  • Is there any help available , highly appreciate if somebody can help

    I am closing the Thread as able to resolve the issue. Thanks will post my solutions soon when possible.

    • Edited by devpan Thursday, May 2, 2013 11:28 AM
    • Marked as answer by devpan Thursday, May 2, 2013 11:28 AM
    Thursday, April 18, 2013 7:17 PM

All replies

  • Hello,

    We have a report control forum for this issue. In order to provide better support, I'll move this thread.

    Regards,


    Shanks Zen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 17, 2013 6:12 AM
  • Is there any help available , highly appreciate if somebody can help

    I am closing the Thread as able to resolve the issue. Thanks will post my solutions soon when possible.

    • Edited by devpan Thursday, May 2, 2013 11:28 AM
    • Marked as answer by devpan Thursday, May 2, 2013 11:28 AM
    Thursday, April 18, 2013 7:17 PM