can anybody tell me how should i generate serial no in datareport
i have written a code for retrieving rows from a table .
but i want it should generate sr no also .
suppose
SRNO PRODUCTNAME qty unit
1 lenova lapto 10 pcs
2 IBM LAPTOP 20 "
3 ACCR LAPTOP 50
4 TOSIBA LAPTOP 10
kindly help me
i have written a code for retrieving rows from a table .
but i want it should generate sr no also .
suppose
SRNO PRODUCTNAME qty unit
1 lenova lapto 10 pcs
2 IBM LAPTOP 20 "
3 ACCR LAPTOP 50
4 TOSIBA LAPTOP 10
kindly help me
Code:
Private Sub Command4_Click() Dim mr As Integer mr = InputBox("enter a mr no") Set rs = New ADODB.Recordset rs.Open "select * from MR where req_no = " & CStr(mr), con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then With DataReport2.Sections("section1").Controls .Item("text1").DataField = rs.Fields("productname").Name .Item("text2").DataField = rs.Fields("qty").Name .Item("text3").DataField = rs.Fields("unit").Name End With Set DataReport2.DataSource = rs DataReport2.Orientation = rptOrientLandscape DataReport2.Refresh DataReport2.Show vbModeless End If End Sub
Comment