#26766 - 03/30/11 08:16 AM
CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
|
Adagio Groupie
Registered: 01/13/11
Posts: 16
Loc: Saskatchewan, Canada
|
I have tried a few different formulas in Crystal Reports for retrieving sales analysis data for certain time frames and cannot get any of them to come up with the correct calculation that I need. If anyone can help me it would be much appreciated.
I need three separate calculations …
10 Week Sales (back from today) 1 Week Sales (back from today) 3 Weeks Sales – (Precious year from today ahead 3 weeks)
Here are two of the formulas I have tried for the previous year’s sales – they both return the exact same total - ALL of the quantity ever sold instead of just the total sold within the date range.
IF {SR65A Transactions.Date} = (CURRENTDATE -365) TO_ (CURRENTDATE -344) THEN sum({SR65A Transactions.Quantity sold}) ELSE 0
On this one I created a parameter to ask for the date range.
IF {SR65A Transactions.Date} = {?3 Week Prior Year} THEN sum({SR65A Transactions.Quantity sold}) ELSE 0
I am obviously way off track here or completely missing something. Please help…
|
|
Top
|
|
|
|
#26768 - 03/30/11 10:50 AM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Reen]
|
Adagio Action Team
Registered: 03/09/99
Posts: 11663
Loc: Vancouver, BC Canada
|
Hi Reen,
Steve's comment regarding removing the SUM in the formula is right on. That will likely solve the question of getting the same total for all formulas. Also, using the parameters for selecting dates is great and flexible if you want the report to be based on a single date range of sales. But it could be cumbersome if you want multiple columns in the report, each based on a different range. --- I should mention that if you are using Adagio SalesAnalysis, you will want to pick a different report table. You have one named SR65A, which is based on the old DOS-based Sales Analysis. You should be using the SRW68 table, which has all the information stored in Adagio Sales Analysis (and not necesarily in the old DOS version of the program) --- When it is desired to have multiple columns represent different date ranges, I like to create a formula that calculates the number of days difference between today and the transaction date: Formula 'Date diff': CurrentDate - {SRW68 Transactions.Date}
This gives an integer result that is the number of days old for the invoice. Future dated invoices will have a negative number.
Then it is easier to determine the date ranges needed: 10Week: IF {@Days diff} IN 0 TO 69 THEN {SRW68 Transactions.Quantity sold} ELSE 0
1Week: IF {@Days diff} IN 0 TO 6 THEN {SRW68 Transactions.Quantity sold} ELSE 0
LY3Weeks: IF {@Days diff} IN 344 TO 365 THEN {SRW68 Transactions.Quantity sold} ELSE 0
And so on, whatever numbers are required. There also are pre-defined Date Ranges available in the formula editor for comonly used ranges:
IF {@Days diff} IN YearToDate THEN {SRW68 Transactions.Quantity sold} ELSE 0
_________________________
Regards, Softrak Tech Support
|
|
Top
|
|
|
|
#26771 - 03/30/11 12:48 PM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Softrak Support]
|
Adagio Groupie
Registered: 01/13/11
Posts: 16
Loc: Saskatchewan, Canada
|
OK Thank you. I will see if I can now get this thing to work. I might be back for more help.
Thanks again.
|
|
Top
|
|
|
|
#26942 - 04/14/11 10:25 AM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Reen]
|
Adagio Groupie
Registered: 01/13/11
Posts: 16
Loc: Saskatchewan, Canada
|
Good afternoon ...
Once again I need some help on this if possible...
I need to know which fields I can link between the following: ICW65 Items and SRW68 Transactions so that the sales analysis comes in for each item???
I also have the following tables in the report ... ICW65 Items Optional Fields ICW65 Items Vendor Information ICW65 Report Groups
Thanks
|
|
Top
|
|
|
|
#26950 - 04/15/11 06:21 AM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Douglas Dickie]
|
Adagio Groupie
Registered: 01/13/11
Posts: 16
Loc: Saskatchewan, Canada
|
I am having trouble with summarizing the data. I cannot seem to get this set correctly to sum all the transactions in each time frame (1 wk, 10wk, 3wks prev.) It is only dumping in the quantity of the very last transaction in each period.
|
|
Top
|
|
|
|
#26951 - 04/15/11 07:30 AM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Reen]
|
Adagio Master
Registered: 03/16/99
Posts: 10504
Loc: Canada
|
Have you placed the SalesAnalysis records in the detail section of the report, inserted totals and then suppressed (hidden) the detail section?
_________________________
Andrew Bates
|
|
Top
|
|
|
|
#26952 - 04/15/11 08:05 AM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Retired_Guy]
|
Adagio Groupie
Registered: 01/13/11
Posts: 16
Loc: Saskatchewan, Canada
|
Thank you Andrew. I did not have it set up that way. Now that I do it is working perfectly.
|
|
Top
|
|
|
|
#26998 - 04/21/11 06:43 AM
Re: CRYSTAL REPORT FORMULAS - SALES ANALYSIS DATA
[Re: Reen]
|
Adagio Groupie
Registered: 01/13/11
Posts: 16
Loc: Saskatchewan, Canada
|
Now that I have the Sales Analysis working and giving me the correct numbers, it is only showing the very last item listed in each group. I have it set up as follows...
Page Header - Report Name
Group Header #1 - Group Name and all column headers
Details - Weekly sales formulas which I need to run totals on - supressed
Group Footer #1 - Item No, Description, UOM, QonH, QonSO, Base$, etc. AND the Sales Forecast (which is a formula calculated off the Weekly sales formulas and their sums)
Page Footer - Date/time/page no.
Can anyone tell me what I am doing wrong or missing to get all of my items to show in each group?
|
|
Top
|
|
|
|
|
1867 Members
5 Forums
14576 Topics
71139 Posts
Max Online: 1408 @ 12/09/25 01:48 AM
|
|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
|
28
|
29
|
30
|
31
|
|
|
|
|
|