Can we assign ADo.NET Dataset to reportviewer
Hi, Is there any possiblity of datasource obtained from front end ADO.NET like DataSet /DataTable to Reportviewer to view report. Something like pushing data to report. My second question, Can we make call to webservice on click on "View Report" button, after selecting parameters in report -MahenderMahender
October 21st, 2010 10:29pm

Yes, you can. The easiest way I have found is: Create a DataSet.xsd object. Create a DataTable and define columns. At this point it is just a structure of a table, not real data. Create a Report .RDLC Under Report->Data Sources menu, find your table definition in the Project Data Sources menu, and click [Add to Report]. Note the name of this data source, or rename it here. The Report should now recognize your table's columns for use in the report. Design your report to your liking. Add a ReportViewer object to your WinForm. Assign the report using .LocalReport.ReportEmbeddedResource or using the design mode dropdown on the ReportViewer. The name is in the format ProjectName_ReportName.rdlc In .Net, create a New DataTable object from your DataSet definition, and .Fill it from something ReportViewer.LocalReport.DataSources( DataSourceName ).Value = YourDataTable to assign the data to your report ReportViewer.RefreshReport to redraw -- Scott
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2010 12:39am

Hi Mahender, Do you mean you have created an application with a ReportViewer control in it, and the Report Viewer control is running in Local Processing Mode? If so, we can specify dataset to the report as steps Scott posted. As an example, please also refer to the similar thread: For the second question, since ReportViewer control has a ViewButtonClick event, we can call web services in this event handler. If I have misunderstood, please elaborate you requirement and what you have achieved. Then I will provide you further assistance. Thanks, Tony Chain Please remember to mark the replies as answers if they help and unmark them if they provide no help
October 25th, 2010 10:45am

Thnx tony and scott. Yes, one cliking of ViewButtonClick , can we call webservices in the event handleer -MahenderMahender
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 3:49pm

Hi Mahender, Which processing mode is configured to the ReportViewer in your application, Local or Remote? If the ReportViewer control is running in Local mode, it means the ReportViewer processes local report by its built-in functions. In this scenario, we can specify a dataset to the ReportViewer control as mentioned in previous replies. However, the parameter prompt panel would not be integrated in the Report Viewer control in this mode, so we need to customize the report parameter prompt in the application. For example, we can use some dropdown list controls to allow users select parameters and use a button control as the ‘View Report’ button. Then we can call the web service in click event handler of this button. If the ReportViewer control is running in Remote mode, it means the ReportViewer just renders report on Report Server, so we are not allowed to specify a dataset to it. In this mode, if the ShowParameterPrompts property of the ReportViewer is specified to True, the parameter prompt panel will be displayed integrated in the ReportViewer control, and we can call web service in the ViewButtonClick event handler. If anything unclear, please feel free to ask. Thanks, Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
October 31st, 2010 10:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics