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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display the current week of data - Crystal Reports 2016

Status
Not open for further replies.

Deaconskye

Technical User
Aug 2, 2018
1
US
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?

 
I assume you have two date groups by Month and by week. Then placed your charts in week and Month group header?

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top