Table and date:
EntryID | Empno | Empname | Date | Receivable | Status |
---|---|---|---|---|---|
EmpNo4 | Zulfiqar | Baloch | 2022-05-07 | 15000 | Received |
EmpNo4 | Zulfiqar | Baloch | 2022-04-07 | 15000 | Received |
EmpNo4 | Zulfiqar | Baloch | 2022-03-07 | 15000 | Received |
EmpNo3 | Gul | Ahmed | 2022-05-07 | 20000 | Received |
EmpNo3 | Gul | Ahmed | 2022-04-07 | 20000 | Received |
EmpNo3 | Gul | Ahmed | 2022-03-07 | 20000 | Received |
EmpNo3 | Gul | Ahmed | 2022-02-07 | 20000 | Received |
EmpNo3 | Gul | Ahmed | 2022-01-07 | 20000 | Received |
EmpNo4 | Zulfiqar | Baloch | 2022-02-07 | 15000 | Received |
EmpNo4 | Zulfiqar | Baloch | 2022-01-07 | 15000 | Received |
I have this data in a table and I want to load it in C# Datagridview as columns like EmpNo, Name, January, February, March etc Meaning one persons data be showed horizontally in month wise column. Please Help if you can.
Query I tried ?:
I tried multiple queries with that i got this result
Employee No | Name | Jan | Feb | Mar |
---|---|---|---|---|
EmpNo3 | Gul Ahmed | 20000 | ||
EmpNo3 | Gul Ahmed | 20000 | ||
EmpNo3 | Gul Ahmed | 20000 |
It creates a new row for each month I want is all the months for a person in single row.