Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have parameters and want to run a report using my parameters

Status
Not open for further replies.

tazibc

Instructor
Oct 5, 2007
66
GB
I want to be able to run my report over a month period but I want it to exlude all data for sundays only is there a way I can do this???

I have two parameters a start date and an end date If I want to run it over a month period to not include sundays.

Thanks
 
Try DatePart to get the day of the week, that's
Code:
DatePart ("w", {date1})
Put this as a formula field and it gives a number, 1 to 7. The default is Sunday as 1 and Saturday as 7, though you can change this using firstDayOfWeek

Add to your selection a command like
Code:
@WhichDay <> 1


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks Guys where would I put this formula and if I wanted to run the report for the whole of feb would it exclue sundays??

if so how would I put this in my repot as I am new to crystal version 2008
 
As MAdawc stated - the first quote he gave is for a formula.

So create a new formula called 'Whichday' and copy the contents in.

The text in the second quote should be added to your selection criteria.

Report -> Selection formula -> Record Selection

and add the text to your existing criteria...

(Literally type in something like:
AND {@Whichday} <> 1
)

If you instead try the third quote then do the same as you would for Madawcs second quote and add it to the selection criteria with an AND dayofweek({table......etc

'J


CR8.5 / CRXI - Discovering the impossible
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top