Happy Pre New Year Everyone!!
I am running Crystal 8.5 (not my choice) pulling from an Oracle database.
I have a crosstab that has @Family as the Row and Quarter as the Column. The Summary is a formula that adds different formulas, dollar amounts, together based on criteria in each @Family.
Example of crosstab (there are over 50 different family's but I am using just 3 examples here):
Quarters
20063 20062 20061 ... 20024
Drug1 ? 352 420
Drug2 ? 51,251 60,321
Drug3 ? 671 750
The @Total formula works great for all quarters prior to current. What I consider current quarter is prior to current actual. In this case current quarter is 20063.
What I need this to do is take the amounts from 20062 and multiply a percentage to that amount and place it in 20063. There are 5 different percentages that are based on whatever the family (drug 1 through drug3) is.
In this case I would take drug1 and multiply the 20062 total of $352 by (1-.011). This is to show an estimated decrease of 1.1% qtr 20063. Drug2 would be (1-.032) and drug3 would be (1-.026). I would only need to do this for the current quarter as it's only an projected estimate of sales.
Any thoughts on how to do this? I have tried several things but can't get it to populate 20063 quarter. In a stand alone formula in the detail section it works fine. I just can't get it to work in the @Total formula for the Crosstab.
Here is the code for my @Total formula:
@Total
Code Begins.............
If {CLM.CLMTYP_CD}="RESUB" Then
{@New Total Recon}
Else if {@Interest Only}>0 Then
{@Interest Only}
Else {@New Total Recon}+{@Interest};
Code Ends.............
Let me know if you need additional info.
Thanks in advance,
John
I am running Crystal 8.5 (not my choice) pulling from an Oracle database.
I have a crosstab that has @Family as the Row and Quarter as the Column. The Summary is a formula that adds different formulas, dollar amounts, together based on criteria in each @Family.
Example of crosstab (there are over 50 different family's but I am using just 3 examples here):
Quarters
20063 20062 20061 ... 20024
Drug1 ? 352 420
Drug2 ? 51,251 60,321
Drug3 ? 671 750
The @Total formula works great for all quarters prior to current. What I consider current quarter is prior to current actual. In this case current quarter is 20063.
What I need this to do is take the amounts from 20062 and multiply a percentage to that amount and place it in 20063. There are 5 different percentages that are based on whatever the family (drug 1 through drug3) is.
In this case I would take drug1 and multiply the 20062 total of $352 by (1-.011). This is to show an estimated decrease of 1.1% qtr 20063. Drug2 would be (1-.032) and drug3 would be (1-.026). I would only need to do this for the current quarter as it's only an projected estimate of sales.
Any thoughts on how to do this? I have tried several things but can't get it to populate 20063 quarter. In a stand alone formula in the detail section it works fine. I just can't get it to work in the @Total formula for the Crosstab.
Here is the code for my @Total formula:
@Total
Code Begins.............
If {CLM.CLMTYP_CD}="RESUB" Then
{@New Total Recon}
Else if {@Interest Only}>0 Then
{@Interest Only}
Else {@New Total Recon}+{@Interest};
Code Ends.............
Let me know if you need additional info.
Thanks in advance,
John