I am New to Vb.Net 2008 with Access 03
Sample Code : This Fill All Agents in Desc Order by Selected Country in DropDown
Dim Da As New SDS.OleDbDataAdapter("select AgentId,count(TripId) AS Trips from Trip where country='" & CmbCountry.Text & "' group by AgentId order by COUNT(TripID) desc", con)
Dim Ds As New DataSet
DataGridView1.DataSource = Ds
DataGridView1.DataMember = "Trip"
Catch ex As Exception
Example Output for Required Code :
Australia India Iran Iraq
abc xyz abc xyz
xyc abc xyc abc
wrs wrs wrs wrs
I Have Fild Named Agent, TripID, Country Date etc.
I Fill Datagrid with top Three Agent by only one country. Its fine till here.
Now I want to Fill Datagrid with Top Three Agent for All Country
like Above Showed in Example,
Australia has top three agent named abc, xyz & wrs
Output should be like this :
First Row = Country Names (India, Iran, Australia etc)
Second Row = Agent Names who Done maximum Trips in Related Country(First Row)
Third Row = Agent Names who Done Second maximum Trips in Related Country(First Row)
Fourth Row = Agent Names who Done Third maximum Trips in Related Country(First Row)
How Can I Do It? What's changes Required in above code?