Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# CrystalReports
I have the Data in below format :
Emp-ID  Date    TimeIn  TimeOut
E001    1/1/2013    9:30    6:30
E001    1/2/2013    9:30    6:30
E001    1/3/2013    9:30    6:30
E001    1/4/2013    9:30    6:30
E001    1/5/2013    9:30    6:30
E001    1/6/2013    9:30    6:30
E001    1/7/2013    9:30    6:30
E001    1/8/2013    9:30    6:30
E001    1/9/2013    9:30    6:30
E001    1/10/2013   9:30    6:30
E001    1/11/2013   9:30    6:30
E001    1/12/2013   9:30    6:30
E001    1/13/2013   9:30    6:30
E001    1/14/2013   9:30    6:30
E001    1/15/2013   9:30    6:30
Required Reprot in below fromat:
Emp-ID  Date     1/1/2013     1/2/2013     1/3/2013.......
E001    TimeIn      9:30        9:30         9:30.......
E001    TimeOut     6:30        6:30         6:30.......
Please help me out i am stuck if you have any reffrence file send me ..
Posted 4-Apr-13 2:02am
Edited 4-Apr-13 7:56am
v3
Comments
ThePhantomUpvoter at 4-Apr-13 13:02pm
   
You need to query your data using a PIVOT.
Prathap Gangireddy at 4-Apr-13 14:20pm
   
There are two options to get the above result
 
1) using pivot write a query in SQL
2) You can use cross-tab in crystal reports.
 
Let me know if needed any help with query using Pivot.
Jaqsalahuddin at 8-Apr-13 2:08am
   
Thanks every 1 my problem has been resolved, i got the solution what i want .. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Better use Cross Tab and set the values overthere for the horizantal format.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Use Crosstab report
Columns = Date   
 
rows    = EmpId
 
Summary fields = TimeIn     
                 TimeOut
Happy Coding!
Smile | :)
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 584
1 Maciej Los 275
2 DamithSL 233
3 Sergey Alexandrovich Kryukov 209
4 BillWoodruff 200
0 OriginalGriff 6,803
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,421
3 Manas Bhardwaj 4,841
4 Maciej Los 4,330


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 5 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100