Crystal Reports logic for FiscalYear and FiscalPeriod

if {?Customer} = "*" 
then 
{InvcHead.Company} = {?Company}  and
{InvcHead.DocInvoiceAmt} > 0 and
{@Fiscal-Range} >= {?Start_FY-FP} and {@Fiscal-Range} <= {?End_FY-FP} 
else
{Customer.CustID} = {?Customer}  and
{InvcHead.Company} = {?Company}  and
{Customer.Company} = {?Company} and
{InvcHead.DocInvoiceAmt} > 0 and
{@Fiscal-Range} >= {?Start_FY-FP} and {@Fiscal-Range} <= {?End_FY-FP}

Hey, Everybody: 


Would like to create a parameter that would allow a Fiscal Year and Fiscal Period range, e.g., user can enter 2013 period 1 thru 2014 period 5


Having a little trouble putting the logic together in Crystal Reports.


Thanks. 

I'd consider doing a little trickery in Crystal.Â

 

Make a string formula that combines the FY & FP called "myFYFP".Â

 

Something like:Â ToText({FY},0,'') + '-' + ToText({FP},0,'')

 

So your records in Crystal would have another "column" now to utilize called "myFYFP"

 

2014-01

2014-02

2014-03

…

2014-12

 

Now you use parameters within Crystal to filter your results. One param would be "Start_FY-FP" and "End_FY-FP". The user would input or select the appropriate FY-FP range. And your results will be filtered appropriately when you use them in the Select Expert.

 

…. where {@myFYFP} >= {Start_FY-FP} and {@myFYFP} <= {End_FY-FP}

 

 

HTH.

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, January 22, 2015 7:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Crystal Reports logic for FiscalYear and FiscalPeriod

 

 

Hey, Everybody: 

 

Would like to create a parameter that would allow a Fiscal Year and Fiscal Period range, e.g., user can enter 2013 period 1 thru 2014 period 5

 

Having a little trouble putting the logic together in Crystal Reports.

 

Thanks. 

Thanks for the prompt reply.  I've gone ahead and created the formula, it display like you noted, and the parameters request the range in the format year-period, but the results are skewed and don't match up with the parameters.  

For example: 

It's returning all of 2014 if you enter 2014-11 and 2015-01

Please advise.

Thanks.
Sounds like you need to define/month the period also. 

Sent from my iPhone

On Jan 23, 2015, at 12:33 PM, sanfranc415@... [vantage] <vantage@yahoogroups.com> wrote:

 

Thanks for the prompt reply.  I've gone ahead and created the formula, it display like you noted, and the parameters request the range in the format year-period, but the results are skewed and don't match up with the parameters.  


For example: 

It's returning all of 2014 if you enter 2014-11 and 2015-01

Please advise.

Thanks.

Did you apply the params in Select Expert?

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, January 23, 2015 12:34 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Crystal Reports logic for FiscalYear and FiscalPeriod

 

 

Thanks for the prompt reply.  I've gone ahead and created the formula, it display like you noted, and the parameters request the range in the format year-period, but the results are skewed and don't match up with the parameters.  

 

For example: 

 

It's returning all of 2014 if you enter 2014-11 and 2015-01

 

Please advise.

 

Thanks.