Thanx a lot i found another solution for my issue.... actually i used the following code to solve it... i used String collection to store the value and checked it and printed the table accordingly
ElseIf page = "UserApplication" Then
If DS.Tables(0).Rows.Count > 0 Then
InsertPageBreak()
InsertAppUserHeader()
Dim nfile As StringCollection = New StringCollection
Session("sc1") = nfile
For i = 0 To DS.Tables(0).Rows.Count - 1
PopulateAppUsrRow(DS.Tables(0).Rows(i)(0), DS.Tables(0).Rows(i)(1), DS.Tables(0).Rows(i)(2), DS.Tables(0).Rows(i)(3), DS.Tables(0).Rows(i)(4))
'DataSetToExcel.Convert(DS, Response)
Next
Now the Html table gets populated by the following code:
Public Sub PopulateAppUsrRow(ByVal Usrid As String, ByVal Usrname As String, ByVal Grpid As String, ByVal Grpdsc As String, ByVal FncDsc As String)
If Not Session("sc1").Contains(Usrid) Then
Session("sc1").Add(Usrid)
Response.Write("<tr><td align=left>" + Usrid + "</td><td align=left >" + Usrname + "</td><td align=left >" + Grpid + "</td><td align=left >" + Grpdsc + "</td><td align=left >" + FncDsc + "</td></tr>")
Else
Response.Write("<tr><td align=left> </td><td align=left >" + Usrname + "</td><td align=left >" + Grpid + "</td><td align=left >" + Grpdsc + "</td><td align=left >" + FncDsc + "</td></tr>")
End If
End Sub
Im happy with this kinda output.. any advice is appreciated... Thanx in advance... Tash