Skip to content

DevExpress-Examples/reporting-winforms-bind-mdb-with-select-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for WinForms - How to Bind a Report to a Microsoft Access Database Using SelectQuery in Code

This example creates the data source that retrieves data from an .MDB file using the SQL query created in code, and displays data in a simple report created at runtime.

The SqlDataSource instance is created at runtime with the connection string that specifies the MDB file location. The data source needs a query to retrieve data. In this example, the query is the SelectQuery instance. The SelectQueryFluentBuilder API allows method chaining for query creation. The query selects columns from two data tables with an inner join relation, and sorts, groups, filters, and aggregates data. The newly created query is added to the SqlDataSource.Queries collection.

A report is the XtraReport class instance that contains a Detailband and a Label control. Depending on the Data Binding mode, the control uses the DataBindings or the ExpressionBindings property to bind to data.

Use the report's DataSource and DataMember properties to assign the data source to the report.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Create the data source that retrieves data from an .MDB file using the SQL query created in code

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •