Hi,
I am not sure what table structure you have to get the data.
Hope you have table which list the Dates for specific Month...
if you already have the DataTable Which List the Dates the just Find the DateName for all the Dates in the Month
Crystal Code
weekdayname(dayofweek({Table.FieldName})) this will list the weekday like Monday Tuesday and so on
so just filter your report on startdate enddate for that month where weekdayname is Friday.
sql code
DATENAME(DW,DateField))
*Then in your report just select the DateName where it is Friday.
*************************************************
If you don't have DatesTable you can build one using the SQL Code Below to build it from Scratch with the same ID as ID in your DataTable and link them both.
I have used Identity for the sample
CREATE TABLE [dbo].[DateTab](
[ID] [int] IDENTITY(1,1) NOT NULL,
[StartDate] [datetime] NULL,
[DayName] [nvarchar](50) NULL
) ON [PRIMARY]
GO
Declare
@startdate datetime,
@enddate datetime
set @startdate =DATEADD(DAY,1-DATEPART(DAY,GETDATE()),GETDATE()) --StartDate
set @enddate= DATEADD(DD,-DAY(DATEADD(M,1,@startdate)),DATEADD --EndDate
(M,1,@startdate))
While @startdate <= @enddate
begin
insert into dbo.DateTab(StartDate,DayName) values(DATEADD(DD,@cnt,@startdate),DATENAME(DW,@startdate))
set @startdate =@startdate + 1
end
Hope that helps
Cheers
Rahul
Edited by rahulwalawalkar - 21 Jun 2010 at 7:57am