Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Monthly reports with weekend day only Post Reply Post New Topic
Author Message
sebarpin
Newbie
Newbie


Joined: 21 May 2009
Location: Canada
Online Status: Offline
Posts: 2
Quote sebarpin Replybullet Topic: Monthly reports with weekend day only
     Posted: 21 May 2009 at 8:55am
Hi,
 
I want to setup a reports that I can run Monthly, and will only take the Saturday and Sunday stats and combine it.
 
Does anyone know how to do that?
 
Thanks

Seb
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 May 2009 at 9:10am
If you have a date field that you can filter on you can use the weekday()
function int he select statement:
weekday({table.datefield},crMonday)>5
 
I assume you will also want a date range but not sure what that is I so can't add that in for you here but it can be another condition within your select statement.
IP IP Logged
sebarpin
Newbie
Newbie


Joined: 21 May 2009
Location: Canada
Online Status: Offline
Posts: 2
Quote sebarpin Replybullet Posted: 21 May 2009 at 9:50am
Not sure how I will make this work.
 
I have the main report where I'm selecting the Month (4/1/2009) into my timestamp field. This timestamp field is link with the timestamp field into the subreport. I want my subreport to only peg from April month only the stats of the weekend. Where should I put the weekday stuff?
 
Thanks
 
Seb
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 May 2009 at 12:21pm

If I understand you correctly you already have your data filtered in the main report via month selection. You also have a sub report set up pulling in this same data by linking on the timestamp but you want your sub report to exclude weekday items.

In your sub report select statement add the above formual i gave you with an "and" to how you already have it set...
First part of select statement here...
and
weekday({table.datefield},crMonday)>5
IP IP Logged
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