How To Generate Serial No.In Data Report in VB6.0?
Thanx In Advance........ ............... ......
Why do you mean by this? Does your data report source connected to a database? If yes, just add the PK or any unique identification to the data report. This will serve as your Serial No if you want.
Why do you mean by this? Does your data report source connected to a database? If yes, just add the PK or any unique identification to the data report. This will serve as your Serial No if you want.
Rey Sean
yes my datareport source connected to a database.But what is PK? & how to add PK?
hi
what is your database? i.e. access oracle or sql etc.
my database is access.
but i con't want to sr. no. in datatable.
i want to add this field external from datareport.
plz give solution of this problem.
thanx in advance........ ...
hi
the only way out is to make recordset at run time add serial no to it and then bound it to the data report
you can add new field to the recordset as follows
shape {select * from table1} append new adbstr srNo
dim i as integer
for i = 1 to rst.recordcount
rst.fields("srN o").value = i
next
you can bind datareport as follows
with dataReport1
.datamember = ""
set .DataSource = rst
.sections("Deta il").controls(" fld1").datameme ber = ""
.sections("Deta il").controls(" fld1").datafiel d = "Fld1"
.refresh
end with
hope this will help you
regards
manpreet singh dhillon hoshiarpur
Comment