Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Month Formula Query Post Reply Post New Topic
Author Message
gcarter
Newbie
Newbie
Avatar

Joined: 08 Jan 2016
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote gcarter Replybullet Topic: Month Formula Query
     Posted: 18 Jan 2016 at 9:23pm
Hi All,
 
Am needing assistance, with what should be a straight forward issue.
I run crystal reports version 11.59 and use the below forumala to extract data from an assyst database from various local support teams
 
{inc_data.event_type} = "i" and
date({incident.inc_resolve_act}) = LastFullMonth and
{incident.inc_status} <> "o"
 
All I need to know is how do I ammend the above formula to produce data for either a specific month or data over several months?
 
Examples would be useful :-)
 
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 19 Jan 2016 at 4:28am
Two things I am assuming.  One, that the above formula is the select formula.  Second, that you would need a parameter or two.  So we only need to focus on the  date({incident.inc_resolve_act}) = LastFullMonth statement.  To get a specific month number you would probably use something like this; month(date({incident.inc_resolve_act})) = {?monthParameter}.  To get a range of months (not considering years) you could do something like this; month(date({incident.inc_resolve_act})) >= {?begmonthParameter} and ; month(date({incident.inc_resolve_act})) <= {?endmonthParameter}
IP IP Logged
gcarter
Newbie
Newbie
Avatar

Joined: 08 Jan 2016
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote gcarter Replybullet Posted: 19 Jan 2016 at 4:32am
Thanks for that, so for example if I wanted to see data from January 2015, can you provide an example of what the complete formula would be....
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 19 Jan 2016 at 11:35am
So do you want from January 2015 to present or just January 2015? 
IP IP Logged
gcarter
Newbie
Newbie
Avatar

Joined: 08 Jan 2016
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote gcarter Replybullet Posted: 19 Jan 2016 at 9:20pm
Originally posted by kevlray

So do you want from January 2015 to present or just January 2015? 
 
Examples of both please :)
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 20 Jan 2016 at 4:12am
Now that begs the question, how is the user going to input the parameters.  Actual date, Month name and year, some other string format (YYYY/MM), etc.
IP IP Logged
gcarter
Newbie
Newbie
Avatar

Joined: 08 Jan 2016
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote gcarter Replybullet Posted: 20 Jan 2016 at 4:17am
well the user is me, so whatever works to drill down on a particular month.....
IP IP Logged
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