Local Table as Datasource for localreport

Discussion in 'ASP .Net Web Controls' started by Steve Blain, Apr 10, 2009.

  1. Steve Blain

    Steve Blain Guest

    I have a web page that runs a method to process some data and returns a
    datatable if there are errors. I am trying to display the returned table
    using a localreport with the reportviewer. How do I set the table to be the
    datasource for the report? Usually we use an objectdatasource to call a
    method which returns the table. I am assuming there is a way to bypass that
    step but I don't see what it is. Thanks for any help.
    --
    Stephen A Blain
    Computer Resources, LLC
    Steve Blain, Apr 10, 2009
    #1
    1. Advertising

  2. Steve Blain

    Steve Blain Guest

    Here is what I did to solve my problem: (vb.net code)

    Dim instance As New ReportDataSource("Sch_Upfree_Errors_DataTable1",
    ErrorTable)
    Me.ReportViewer1.LocalReport.DataSources.Add(instance)
    Me.ReportViewer1.LocalReport.DataSources.Item(0).DataMember = "ErrorTable"

    DataTable1 is the only data table defined in the Sch_Upfree_Error Reort
    Dataset in the project, ErrorTable is the name of the local table that holds
    data to be printed.


    "Steve Blain" wrote:

    > I have a web page that runs a method to process some data and returns a
    > datatable if there are errors. I am trying to display the returned table
    > using a localreport with the reportviewer. How do I set the table to be the
    > datasource for the report? Usually we use an objectdatasource to call a
    > method which returns the table. I am assuming there is a way to bypass that
    > step but I don't see what it is. Thanks for any help.
    > --
    > Stephen A Blain
    > Computer Resources, LLC
    Steve Blain, Apr 10, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    0
    Views:
    1,756
  2. Oenone

    LocalReport.Render does not return

    Oenone, Feb 20, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    1,715
    \(O\)enone
    Feb 20, 2007
  3. Akshay shah

    LocalReport.SubreportProcessing

    Akshay shah, Jul 21, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    547
    Akshay shah
    Jul 21, 2008
  4. Rob Dob
    Replies:
    1
    Views:
    521
    CMoss
    Jul 30, 2007
  5. Reynolds

    LocalReport.GetTotalPages()

    Reynolds, Feb 28, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    322
    Reynolds
    Feb 28, 2007
Loading...

Share This Page