This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.
The following namespace is required.
XtraForm and add
PrintControl,RibbonControl,RibbonStatusBar1 to the form. I have given the form as
XtraReport and design as you wish to represent. Following is what I have created.
I have added another form which contains a grid view and button.
On the button click event:
Add a XtraReport to the Designer and Create an object from it. Dim masterreport As New xrBill 'Here i am loopign through the records on grid view For r = 0 To gvGeneratedBills.RowCount - 1 Dim report(r) As xrBill 'Create report object report(r) = New xrBill 'Add report functionality here 'Set the modifier property of reports controls to public 'you can access report controls and passing data from the DB 'Finally Create the report report(r).CreateDocument() 'Add the created report's page to the main report masterreport.Pages.AddRange(report(r).Pages) 'Set the page no to the continues format masterreport.PrintingSystem.ContinuousPageNumbering = True 'Bind the main report printing system to the form's printing system frmPrint.PrintControl1.PrintingSystem = masterreport.PrintingSystem Next 'Display the report frmPrint.Show() frmPrint.BringToFront()