Getting error "there is no row at position 0"

You're not checking if your tables have any content. The message is clear: There is no row at position 0.

The exception is probably being thrown on this line, or one following it:

LblTaskID.Text = rep.Tables[0].Rows[0]["TaskID"].ToString();

You should verify that rows exist before attempting to get data from them. Something like the following:

var table = rep.Tables[0];
if (table.Rows.Count > 0){
    // Fetch the data... 
}
else
{
    // Handle missing data in an appropriate way...
}

The earlier advice is all good and you should follow it.

However it looks obvious to me that the reason there is no row at position 0 is that you are looking at the wrong table. I seriously doubt you have id in one table, name in another, etc., but you are indexing to a different table for each piece of data.

rep.Tables[1]
rep.Tables[2]
rep.Tables[3]
rep.Tables[4]
rep.Tables[5]
rep.Tables[6]

should all be

rep.Tables[0]

You surely only have one table, but are looking at table 0 through table 6!