For Each Cycle - Combined or Compound to consolidate records

0

Good afternoon, I have a table where I record information of people per day, in my table it is recorded day by day, now they ask me to present this information in a single row with one column for each day, I present the name, Monday entry , Tuesday Wednesday Thursday Friday Saturday Sunday. My problem is that I have not been able to tell you to consolidate me into a single record in a new table that I made, my code is as follows, I work with dataset and it is visual basic net.

I fill the tableadapter with the records

dim aocodigo as string = string.empty
for each aoregistros in dataset.detalledecodigos
     aocodigo = aoregistros.codigo.trim.tostring()
     hago una busqueda con este codigo, para completar otra informacion
     if lo encontro 
        'inserto los registros
        aorowtabla = dataset.tblsemana.newblsemarow
        aorowtabla.codigo = aoregistros.codigo
        aorowtabla.fechapordia = aoregistro.fecha
        aorowtabl.montoingreso = aoregistro.ingresopordia
        'Agregar registro nuevo
        dataset.tblsemana.addtablesemanarow(aorowtabla)
     endif
next

When he finishes he does it well, he includes as an example the twelve records that the person had in the week, but one by one, and I need them to be a single record, or a single line like that in excel.

thanks

    
asked by alfredo.avmb 20.10.2017 в 00:40
source

0 answers