Dewayne_Pinion
11 years agoContributor
.NET ReportViewer - how to verify reports
All,
Our application uses the .NET report viewer to display report information from our database. The viewer itself seems flat and I cannot access individual fields for comparison. Could anyone suggest how I might go about comparing the data in this case?
Thanks
You can access data in the report by using ReportViewer's native properties and methods, such as:
LocalReport.DataSources.Item(DataSourceIndex).Value
ServerReport.GetDataSources().Item(DataSourceIndex).Value
You can also turn on Microsoft UI Automation identification for your application - this should expose the report elements as individual objects.- Go to Tools > Current Project Properties.
- Select the Open Applications > UI Automation category.
- Add WindowsForms*.Window* to the list.
- Save the changes.