krishan kumar  singh

krishan kumar singh

  • 1.5k
  • 236
  • 73.7k

how can display multiple table records in single crystal Reports in vb.net

Aug 1 2011 9:08 AM
  Dim rpt As New rptStockOUtDetailsList
        Dim rview As New frmFGStockOutBillDisplay
        Dim QueryString As String
        QueryString = "select Distinct FGStockOut_ID ,Customer_Name ,IssueNo ,IssueDate ,Remark  from dbo.FinishGoodsStockOut where FGStockOut_ID ='" & frmFGStockOut.lblFGSTockoutID.Text.Trim() & "'"
        Dim Adapter As SqlDataAdapter = New SqlDataAdapter(QueryString, con.oCon)
        Dim ds As DataSet = New DataSet()
        Adapter.Fill(ds, "Table1")
        QueryString = "select Product_Name=(Select Prod_Name  from dbo.ProductMast P where P.Prod_ID =F.Product_Name ),Color_Name=(select Color_Name  from dbo.ColorMast C where C.Color_ID =F.Color_Name  ),Size_Number ,Qty,Unit_Number ,Unit_Price ,Amount   from dbo.FinishGoodsStockOut F where  FGStockOut_ID ='" & frmFGStockOut.lblFGSTockoutID.Text.Trim() & "'"
        Adapter = New SqlDataAdapter(QueryString, con.oCon)
        'ds = DataSet()
        Adapter.Fill(ds, "Table2")
 'rpt.Database.Tables("COMMAND").SetDataSource(ds)
        rpt.SetDataSource(ds)
        rpt.SetParameterValue("CompName", "Comp")
        rview.CrystalReportViewer1.ReportSource = rpt
        rview.ShowDialog()
        rview.Dispose()
        rpt.Close()
        rpt.Dispose()
        rpt = Nothing
        Me.Close()




Answers (1)