How to bind a DataSet to a ReportViewer object?



I use DataSet which I get from Web Service and it doesn't maintain an active
connection to the database. So that I can't populate table in Report.rdlc
dragging fields from the DataSets window to the some rows in the table. I
want to display DataTable from the DataSet via the new ReportViewer. I tryed
something like this, but it doesn't work.

reportViewer2.ProcessingMode = ProcessingMode.Local;
reportViewer2.LocalReport.ReportPath = "Report1.rdlc";
reportViewer2.LocalReport.DataSources.Add(new ReportDataSource("DOH",
GetData2(inputFile))); //GetData2(inputFile) returns the datatable
reportViewer2.RefreshReport();

Am I missing something?

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-csharp/200604/1
.



Relevant Pages

  • Re: One Web Service updates SQL, another cant?
    ... I guess its because this is my first Web Service and I ... it opens the database connection. ... > Columnist, SQL Server Professional ...
    (microsoft.public.sqlserver.security)
  • Re: Reusable Database connection for Combo Box, list box and other query
    ... List boxes. ... languages you have an abstraction to the database where you can pass ... Here is code to populate one of my Combo boxes. ... I have one more and I have to repeat my Connection code each time: ...
    (microsoft.public.excel)
  • Re: REPOST: One Web Service updates SQL, the other cant
    ... One Web Service can access and update the database via ADO ... > possible using the following connection string: ... > Columnist, SQL Server Professional ...
    (microsoft.public.vb.database.ado)
  • Jet database access problem from web service
    ... I have trouble connecting to Access database from my web service. ... permissions into the directory where database is located; ... I also tried an Odbc connection with with the follwoing string: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Connecting to Access through Ado in Web service
    ... database through TAdoConnection in a D7 web service. ... We tried setting the connection strings datasource property ... tested it at design time and it fails. ... We have also tried setting the database path in network format, ...
    (borland.public.delphi.database.ado)