DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 3 Aug 2007 11:06:03 -0700,    posted on: microsoft.public.dotnet.datatools        back       

Thread Index
  1    Weste


Binding to a Business Object   
Here is what I am trying to do.  I am using ASP.NET 2.0.  I have created a 
data set called Stocks data table called Data and put it in the App_Code 
folder.  I am filling the data table from data in a csv file located on the 
web.  I am populating the data table with the following code.  This code 
works because I checked the record count and it shows 21 records for the Data 
data table.

public static DataSet Convert()
    {
        WebClient Client = new WebClient();
        Stream myStream = Client.OpenRead("http://mysite.com/table.csv");
        StreamReader myStreamReader = new StreamReader(myStream);
               
        Stocks myStocks = new Stocks();
        
        string line = myStreamReader.ReadLine();
        string allData = myStreamReader.ReadToEnd();

        string[] rows = allData.Split("\r\n".ToCharArray());

        foreach (string r in rows)
        {
            string[] items = r.Split(",".ToCharArray());
            myStocks.Tables["Data"].Rows.Add(items);
        }

        return myStocks;
    }

I am trying to bind the data in this table to a report.  I added a report to 
my project and selected the fields from the data table.  I then added a 
ReportViewer control to the web form.  I’m not sure how to configure the 
ObjectDataSource that is added to the web form after the ReportViewer control 
is added.  It firsts asks to select business object.  I have the following 
options.  I’m not sure what to select.

Stocks
Stocks + DataTable
Stocks + DataRow
Stocks + DataRowChangeEvent
Stocks + DataRowChangeEventHandler

Next I need to define a data method.  Not sure what option to select.  I 
just want to bind the report to the data table and return the rows.

Any help would be appreciated.  Thanks.

Weste
Date:Fri, 3 Aug 2007 11:06:03 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us