I`m pretty new to Crystal, and I can`t figure out how to summarize formula that is calculated from the subreport. Here`s the situation:
In the subreport I have the following —
//@subformula
//stores the grand total of the
//{@cost} field
//in a currency variable called `myTotal`
whileprintingrecords;
shared currencyvar myTotal := sum({@cost})
Then in the main report —
//@MainFormula
//Returns the value that was stored
//in the shared currency variable called
//myTotal in the subreport
Whileprintingrecords;
shared CurrencyVar myTotal;
myTotal
Then I placed this formula {@stcost}in the details section:
{@MainFormula}*{lbs_scrapped}/{net_per_1000}
Everything works out fine with this setup, but then I try to create the following formula:
Sum({@stcost}, {date}, “daily”) ------ my report is grouped by days
But then I get the error – this field cannot be summarized. What am I doing wrong???? Thanks in advance.
In the subreport I have the following —
//@subformula
//stores the grand total of the
//{@cost} field
//in a currency variable called `myTotal`
whileprintingrecords;
shared currencyvar myTotal := sum({@cost})
Then in the main report —
//@MainFormula
//Returns the value that was stored
//in the shared currency variable called
//myTotal in the subreport
Whileprintingrecords;
shared CurrencyVar myTotal;
myTotal
Then I placed this formula {@stcost}in the details section:
{@MainFormula}*{lbs_scrapped}/{net_per_1000}
Everything works out fine with this setup, but then I try to create the following formula:
Sum({@stcost}, {date}, “daily”) ------ my report is grouped by days
But then I get the error – this field cannot be summarized. What am I doing wrong???? Thanks in advance.