Forum Discussion

Dewayne_Pinion's avatar
Dewayne_Pinion
Contributor
10 years ago
Solved

.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 sugg...
  • HKosova's avatar
    10 years ago

    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.