Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my project i want to display the student attendance reports in Date wise..but i maintained a single table for storing all attendance details...In my table the records are stored as,

E.No Name Status Date
225 Arun A 08/25/2011
226 Jegankumar P 08/25/2011
225 Arun P 08/24/2011
226 Jegankumar P 08/24/2011
225 Arun A 08/23/2011
226 Jegankumar P 08/23/2011

here i want a report in following format,

E.No Name 23 24 25
225 Arun A P A
226 Jegankumar P P P
Posted

Hello ,
You may use Pivot in Sql query .
Refer : Simple Way To Use Pivot In SQL Query
thanks
 
Share this answer
 
Comments
mayur darji 23-May-14 1:16am    
can u give me simple example of that report using pivot??
Animesh Datta 23-May-14 1:23am    
please check the link what i have given . The report is generated using Pivot .
mayur darji 23-May-14 1:26am    
But sir i want to dispaly that report in gridview and convert that gridview data in to excel sheet....
Animesh Datta 23-May-14 1:30am    
so what is the problem ? where are you stuck ?
 
Share this answer
 
write the query in report query builder which uses (order by date)...Then it ll display the records order by date either in ascending or descending

For Further Details about the query refer

http://www.w3schools.com/sql/sql_orderby.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900