Display the current week of data - Crystal Reports 2016
Display the current week of data - Crystal Reports 2016
(OP)
Hi,
Im new to Crystal reports, Im trying to build a more granular chart, in Crystal, off a report that I currently generate and then export to excel.
I have data that runs from the start of this year through today as I refresh the report data every morning to include what we did yesterday.
so the fields I use specifically are the Date and the Quantity fields. Simple straightforward but it tells the entire story.
In excel I can show a table that is monthly, weekly and daily, In crystal the charts aren't exactly pivot charts.
I've managed to generate a chart showing the monthly data and a chart showing the weekly data too, what I'd like to do is have a chart generate showing the last 2 weeks worth of data, From Monday to Friday and have that update at the start of next week. Does that make sense?
Im new to Crystal reports, Im trying to build a more granular chart, in Crystal, off a report that I currently generate and then export to excel.
I have data that runs from the start of this year through today as I refresh the report data every morning to include what we did yesterday.
so the fields I use specifically are the Date and the Quantity fields. Simple straightforward but it tells the entire story.
In excel I can show a table that is monthly, weekly and daily, In crystal the charts aren't exactly pivot charts.
I've managed to generate a chart showing the monthly data and a chart showing the weekly data too, what I'd like to do is have a chart generate showing the last 2 weeks worth of data, From Monday to Friday and have that update at the start of next week. Does that make sense?
RE: Display the current week of data - Crystal Reports 2016
You could create another group for a two week band. The only way I can think of doing this is to use week number
DatePart ("ww", {table.date})
@TwoWeekBand
If DatePart ("ww", {table.date})<=2 then Band01
else
If DatePart ("ww", {table.date})>2 DatePart ("ww", {table.date})<=4 then Band02
else
If DatePart ("ww", {table.date})>4 DatePart ("ww", {table.date})<=6 then Band03
.....
Repeat for 26 bands
Need to use zero padding to ensure Group sorts correctly
Group on this and place between Month and week Groups
Ian