Display Report Through the form

248 Views Asked by At

I need to create Xtra _report and Devexpress report. I need the VB.NEt code to display the report through the form

1

There are 1 best solutions below

1
Hamza Mohamed Saeed On
 Dim Adp As New OleDbDataAdapter(" Select * from XX  where XX LIKE '%" & XX.Text & "%'", Con)
    Dim Ds As New DataSet
        Dim RptAtt As New Inv
        Adp.Fill(Ds)
        Dim Dt = Ds.Tables(0)
        If Dt.Rows.Count = 0 Then
            MsgBox("XXX", MsgBoxStyle.Critical, "XX")
            Exit Sub
        End If
        RptAtt.DataSource = Dt
        RptAtt.DataAdapter = Adp
        RptAtt.DataMember = "DataTable1"
        'RptAtt.RequestParameters = False
        Dim Tool_Report As ReportPrintTool = New ReportPrintTool(RptAtt)
        RptAtt.CreateDocument()
        Dim Frm As New Rep_Inv
        Frm.DocumentViewer1.DocumentSource = RptAtt
        Frm.ShowDialog()