Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Report design between start date & end date Post Reply Post New Topic
Author Message
ronakjmistry
Newbie
Newbie
Avatar

Joined: 10 May 2011
Location: India
Online Status: Offline
Posts: 2
Quote ronakjmistry Replybullet Topic: Report design between start date & end date
    Posted: 27 Nov 2011 at 6:45pm
Hello Experts,
Right now I am working on crystal report (of Visual Studio 2008) & I am new in crystal report.

In my project,I want to create reports of the employees with their clock In/Out dates & Total hours.

Now, Reports should be display within given start date & end date.(I am easily getting all details using Dataset.)

If user enters start date 7/11/2011 & end date is 16/11/2011 then reports should be display between these two dates like below Phenomenon.

Example:

7/11/2011(Monday) to 12/11/2011 (Sunday) (1st week)
14/11/2011 (Monday) to 16/11/2011 (Wednesday)(2nd week)

And Should be calculate total hours week wise & It may be possible that user may enter any start date & end date.
(like start date 9/11/2011(Wednesday) to end date 16/11/2011(Wednesday))

Crystal report should look like below,

Mr. White   Clock In            Clock out           Hours
--------------------------------------------------------
            7/11/2011 9:30:00   7/11/2011 2:30:00 5:00:0       
            7/11/2011 2:45:00   7/11/2011 3:45:00 1:00:0
            ...........
            ...........
            11/11/2011 5:30:00 11/11/2011 6:30:00 5:00:0
                                    --------------------
                                      Total Hours 39.800

           
           
            14/11/2011 9:45:00 14/11/2011 11:45:0 2:00:0
            14/11/2011 2:30:00 14/11/2011 6:30:00 4:00:0             
            ...........
            ...........
            16/11/2011 9:42:00 16/11/2011 3:42:00 6:00:0
                                    --------------------
                                      Total Hours 23.300              
            ---------------------------------------------   
            Total Working hours : 63.100            



Is it possible or not??

I am waiting for your valuable response.

Thank You,

Ronak Mistry.


Edited by ronakjmistry - 27 Nov 2011 at 7:51pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 28 Nov 2011 at 6:21am
well for different layouts I would probably use a flag to 'tell' CR how to display the data, then you could use conditional suppression to hide/display sections so the data is formatted as desired.
 
As for the first issue, you would need to create a formula of some sort that identifies which week each record belongs to based on it's date, but what exactly that would be I don't know as you have business rules that dictate when weeks start and stop and what constitutes a 'random' date range.
 
In pseudo code, the fomula would appear to be something like:
if startDate is monday then
  group value = (record date - start date ) / 7
else
  group value = record date
 
at least top part should work, but again, the actual rules will apply
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.000 seconds.