Print Page | Close Window

Date - fiscal year

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1799
Printed Date: 05 May 2024 at 6:45am


Topic: Date - fiscal year
Posted By: fusion
Subject: Date - fiscal year
Date Posted: 30 Nov 2007 at 6:54am
Hello Experts Please help me solve this problem.
In the report that I am creating, user selects a period 200710 which is a parameter value, then the formula must add the opening balance filed with the months in between that period 

Here is the Scenario:
Fiscal year 2008 starts from July 2007 (i.e. 200707 and ends in June 2008 (i.e. 200806).
I have fields as below
Period as YEND, opening balance as OBAL, balance for july 2007 as MM01, balance for aug 2007 as MM02, balance for sept 2007 as MM03, balance for Oct 2007 as MM04,... , balance for May 2008 as MM11, balance for June 2008 as MM12

User selects a period which is in number format say 200708.
Now based on the user input for August I need to add the opening balance field OBAL with the balance for JUl field MM01

similary, if user input is 200710
I need to add fileds: OBAL, MM01, MM02, MM03, MM04.

Please advise.

Thanks



Replies:
Posted By: fusion
Date Posted: 30 Nov 2007 at 1:45pm
Update to the above post.
My date filed G2yend is just the year i.e. YYYY. The user wants to use the parameter as YYYYMM where MM corresponds to corresponding month  i.e. Jun, July, Aug and so on.

all the months are in same row for a specific year YYYY.




Posted By: fusion
Date Posted: 03 Dec 2007 at 11:22am
Problem Solved:

I used parameter (Type: Number) without assigning any fields to it. So the parameter takes input as YYYYMM. Then I created formula F1 which separates the YYYY part of the parameter and then F2 which separates the MM part of the parameter. Now based on values of MM i used If-Then-Else statement to add different fileds.

Thank you.



Print Page | Close Window