Print Page | Close Window

pull a 1 week of data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=23040
Printed Date: 15 May 2024 at 7:32am


Topic: pull a 1 week of data
Posted By: sanchezgmc06
Subject: pull a 1 week of data
Date Posted: 07 Jul 2023 at 8:41am
Hello I have a date parameter where the user will select a date on a Saturday.

I then want it to pull the data for Sunday-Saturday.

Example they enter 7/1/2023 for the parameter date and then I want to bring back the data for Sunday 6/25 - Saturday 7/1.

Thank you



Replies:
Posted By: lockwelle
Date Posted: 07 Sep 2023 at 12:05pm
You have probably already figured this out.

I would have the user input be a paramater, and I would set the date range to be DATEADD("day", -6, @userInput)

This could be set to a variable or hopefully passed to procedure or used in the select clause. Whichever way you are retrieving your data.

It's been a while, I think that should work.



Print Page | Close Window