troubleshooting Question

Crystal Report Rolling month- three months -YTD with previous year comparison

Avatar of Taras
TarasFlag for Canada asked on
Crystal Reports
20 Comments1 Solution153 ViewsLast Modified:
In Crystal Report 2008 .
I am working on one my old report that calculating rolling amounts from customer that have orders from different suppliers.
Columns that I need to compare are: Month, Three Months and Year (6 columns)
-      Full selected month this year to the same month previous year;
-       Three months back from selected month this year to the same three months in previous year
-      Current YTD up to full selected month to previous year to date.
Condition is that only Customers should be included that have orders from suppliers which are older than two years from selected date.
One customer can have several suppliers and one supplier can have several customers.
It means those customers have to have order older that two years from parameter date but they can have beside those  at the same time orders that are not older that two years too.
I need grouping on Suppliers and then their Customers and calculating those values for each customer with total for supplier.

Customer which do not have any orders (amounts) in previous year column should not be included in calculation and should not be shown in report.
I have problem how to restrict and not showing customers which do not have orders in previous year(even they could have in this year).

I created one Main report and two subreports (rpt_Main; rpt_SubMainA; rpt_SubMainB).
In rpt_SubMainA I presented every Supplier with their customer and do those calculation in columns.
In rpt_SumMainB I show only final summaries rows from sub reports rpt_SubMainA.

In rpt_Main I have shared variable “OldCusomers” where I collected all  customers that have orders older than two years from parameter(par_Run_Date) which I use as date for calculation.
Then I passed that shared variable value to be used as criteria in  rpt_SubMainA  plus added condition that orders in this sub report have to be in range previous YTD and Current YTD.

In subreport rep_SubMainA  I have grouping on Suppliers then Customers.


 Everything looks ok up to user asked me not to show those Customers that do not have any orders during previous year (even they could have orders during this year but if they do not have in previous year they should not be include and calculated.
Not sure how to solve this any idea?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros