Integrate FastReport Based on. Net to implement batch printing of bar code labels and fastreport bar code labels
I. Preparations
1. Click here to download FastReport that supports. Net4.0, install it, and crack it.
2. In the VS2012 toolbox, create a tab and add the % installation directory % \ Framework 4.0 \ FastReport. dll Option
You can view an example on the tab, indicating that the integration is successful.
II. Introduction to relevant documents
1. Locate FastReport. config under % current user % \ AppData \ Local \ FastReport, and modify the Language tag for Chinese conversion.
<Language Name="Chinese (Simplified)" Folder="report\Localization"/>
View Code
2. Use the % installation directory % \ Designer.exe to design the report file, such as barCode. frx.
Set the two-column label method, select report --- page settings --- column, and set the number to 2
3. Add the Report component to winform in VS2012
4. Print the code
RepBarCode. load (Application. startupPath + @ "\ report \ barCode. frx "); IList <BarCode> ds = _ bllPurchase. getForBarCode (Purchase. table, purchaseGuids. substring (0, purchaseGuids. length-1); repBarCode. registerData (ds, "inven"); // bind DataBand (master table data) to the data source DataBand masterBand = repBarCode. findObject ("Data1") as DataBand; masterBand. dataSource = repBarCode. getDataSource ("inven"); // primary table repBarCode. show ();
View Code
Iii. effect display