Hello
I am using crystal report in my project.The code is:
Dim i As Integer = 1
Dim j As Integer = 4
Dim bcat As Integer
For bcat = i To j Step 1
Dim cmd As SqlCommand = New SqlCommand("select bincard,location,b_cat,opening_stock,opening_value,rec_qnty,rec_value,iss_qnty,iss_value,closing_stock,closing_value from invitmas where b_cat=" & bcat & " order by b_cat,bincard", myc.conn)
Dim ada As SqlDataAdapter = New SqlDataAdapter
ada.SelectCommand = cmd
Dim ds As DataSet = New DataSet
ada.Fill(ds,
"invitmas")
Dim myreport As ReportDocument = New ReportDocument
myreport.Load(
"D:\MY DOC\StorePurchase\Stockcat.rpt")
myreport.SetDataSource(ds)
stkcat.Visible = True
stkcat.ReportSource = myreport
stkcat.DataBind()
Next bcat
Now the problem is the crystal report is displaying only the record for bcat=4, for rest of the three its not displaying. How to solve it?