DevExpress Tutorial – Print Invoice | FoxLearn

DevExpress Tutorial – Print Invoice | FoxLearn


Welcome to the FoxLearn Today we will learn how to create an invoice using DevExpress First, We will design a simple UI allows you to retrieve and filter records between two dates from the Northwind database, then you can select orders from GridView to print You need to create an orders class to mapping data return from sql You need to create an orders detail class to mapping data return from sql You need to install dapper from nuget You should add a connection string to the app.config file We always use Connection String in forms that we design, but when you design a big software you should set the connection string for once and use it in many forms In this method you use the name of the Connection String instead of the connection string text Every time you want to change the connection string just change the main connection string in the App.Config file By this method you don’t need to change all of the forms in your project, just change the Connection String in the App.Config You need to add a binding source to the GridControl The BindingSource component serves two purposes First, it provides a layer of indirection when binding the controls on a form to data This is accomplished by binding the BindingSource component to your data source, and then binding the controls on your form to the BindingSource component All further interaction with the data, including navigating, sorting, filtering, and updating, is accomplished with calls to the BindingSource component Second, the BindingSource component can act as a strongly typed data source Adding a type to the BindingSource component with the Add method creates a list of that type Dapper is a high performance Micro-ORM supporting SQL Server, MySQL, SqLite, SqlCE, Firebird etc Object relational mappers have been in use for a long time to eliminate the impedance mismatch that exists between the object and data models in an application Dapper is an open source, lightweight ORM developed by the Stack Overflow team, that’s very fast compared to other ORMs primarily because of its light weight Dapper was built keeping performance and ease of use in mind It provides support for both static and dynamic object binding, using transactions, using stored procedures and also bulk inserts of data Now, We will design a simple invoice report You should add a datasource to your report DevExpress Report retrieves report data from data sources through a modular and extensible data layer that uses data processing extensions To retrieve report data from a data source, you must select a data processing extension that supports the type of data source Now, We will create a print form dialog, we used this form to print your report You should add data to all parameters You can use report parameters to pass data to a report before it has been published Parameter values can be specified by end-users in a Print Preview or silently assigned in code You can add a format string to the parameter or databinding Thank you for watching this video

45 thoughts on “DevExpress Tutorial – Print Invoice | FoxLearn”

Leave a Reply

Your email address will not be published. Required fields are marked *