Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: week by week as rows and last 2 years as columns Post Reply Post New Topic
Author Message
wildinsalem
Newbie
Newbie


Joined: 16 Aug 2017
Location: United States
Online Status: Offline
Posts: 1
Quote wildinsalem Replybullet Topic: week by week as rows and last 2 years as columns
    Posted: 03 Sep 2017 at 5:47am
I'm trying to create a report that shows sales by week (date part of ship date) as rows and using if thens to create the totals by year (also date part as ship date) as columns. But I'm getting multiple rows so my report looks like this:

Week 1 | Blackberries | 2016 Amount - $123.45 | 2017 - $0
Week 1 | Blackberries | 2016 Amount - $0 | 2017 - $123.45

and so on....

I think it's a group by problem but I don't know how to do this, create a subgroup or running total to get this right? Does anyone have an example they could show me?

Thanks!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 13 Sep 2017 at 3:45am
Try using a crosstab. Based on your example, your row groups would be week and product, your column group would be year of the week, and your summary field would be a sum of the amount.

-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.035 seconds.