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

Year and Period

Status
Not open for further replies.

AntonioPerera

Vendor
Jan 29, 2006
91
AU
Hi,

In Crystal 11.

I am trying to consolidate an amount field based on Year to Date figures.
My MONTH and my YEAR fields are separate.

If I wanted to get the figures only for the month it would be simple as I can link my parameters directly to show a particular MONTH and YEAR.
But how do I do this to for Year to Date figures.

Example :
If I wanted to view all figures upto November 2009.
Then I have to incorporate all YEAR data upto 2008 (all 12 months) and then in 2009 months 1,2,3,4,5,6,7,8,9,10 and 11 only.

*The problem is that if I put in a select expert to restrict upto month 11 then it will apply upto MONTH 11 on all YEARs.

Any ideas on how to achieve what I want ?

 
Hi,
If the parameters are Latest year wanted and last month of that year then try something like:

Code:
{Table.Year} <= {?YearParameter}
and
( If {Table.Year} = {?YearParamneter} then
  {Table.Month} <= {?monthParameter}
   Else
   True
)

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top