Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Select the last 4 quarters Post Reply Post New Topic
Author Message
adavis
Senior Member
Senior Member


Joined: 30 Oct 2012
Online Status: Offline
Posts: 104
Quote adavis Replybullet Topic: Select the last 4 quarters
    Posted: 18 Sep 2014 at 5:52am
I need to select records from the last 4 quarters.

My data is already grouped by quarter and sorted descending by date.

I would like to only show records from the last 4 quarters, current quarter included.

So if it is Q3 of 2014, I want to return Q3 2014, Q2 2014, Q1 2014, and Q4 2013.

Any tips?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Sep 2014 at 6:44am
datediff("q",table.datefield,today) in 0 to 4
IP IP Logged
adavis
Senior Member
Senior Member


Joined: 30 Oct 2012
Online Status: Offline
Posts: 104
Quote adavis Replybullet Posted: 30 Sep 2014 at 5:15am
My apologies DBlank. I never thanked you for this solution. It works perfectly.
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.016 seconds.