Hi,
I have a table something like this:
Tournament_Group:
(Group_Name: A, Team_Name: Team1, Ranking: 1, Points: 9, Sets: 9:1, Score: 187:100)
(Group_Name: A, Team_Name: Team1, Ranking: 1, Points: 9, Sets: 9:1, Score: 187:115)
(Group_Name: A, Team_Name: Team2, Ranking: 2, Points: 5, Sets: 6:4, Score: 152:120)
(Group_Name: A, Team_Name: Team3, Ranking: 3, Points: 3, Sets: 3:7, Score: 100:145)
(Group_Name: A, Team_Name: Team4, Ranking: 4, Points: 1, Sets: 2:8, Score: 92:180)
(Group_Name: B, Team_Name: Team5, Ranking: 1, Points: 12, Sets: 10:0, Score: 199:100)
(Group_Name: B, Team_Name: Team6, Ranking: 2, Points: 4, Sets: 5:5, Score: 152:148)
(Group_Name: B, Team_Name: Team7, Ranking: 3, Points: 3, Sets: 2:8, Score: 87:155)
(Group_Name: B, Team_Name: Team8, Ranking: 4, Points: 1, Sets: 1:9, Score: 83:180)
I select this by one data source, because I want to display all the groups from the Tournament, whose primary key is specified in the QueryString (@Round, @Tour_ID). But I want to display the groups in separate tables (Group A and Group B) by Repeater. I want to use repeater for case that there will be more than two groups or only one group. And I can not do it in PHP. :-(
Here is my select for datasource:
SELECT DISTINCT ros.Basic_Group_Name, reg.Ranking_in_the_Group, ros.Name, reg.Points_in_the_Group, reg.Sets_Won + ':' + reg.Sets_Lost AS 'Sets', reg.Score_Plus + ':' + reg.Score_Minus AS 'Score'
FROM Tournament_Reg AS reg INNER JOIN Roster AS ros ON reg.Roster_ID = ros.ID
WHERE (reg.Tournament_Round = @Round) AND (reg.Tour_ID = @Tour_ID) ORDER BY ros.Group_Name, reg.Ranking
I want to display something like this:
<h2> Group A </h2>
A Team1 1 9 9:1 187:115
A Team2 2 5 6:4 152:120
A Team3 3 3 3:7 100:145
A Team4 4 1 2:8 92:180
<h2> Group B </h2>
B Team5 1 12 10:0 199:100
B Team6 2 4 5:5 152:148
B Team7 3 3 2:8 87:155
B Team8 4 1 1:9 83:180)
I need to use nested repeaters somehow, but I do not know how to call a select for the specified group in nested repeater. In dataSource I can not set the parameter @Group_Name, because I want more values for it and I can not reach the label from the title (h2) defined in the repeater.
Would anybody help me, please?
Thank you a lot!
Pepin z Hane