Then whats use of having a alias for detail band the save was achieved in FPD26 also. I thought it would work like in Crystal report.
Rajesh
>>I have a report where the order header and detail have relation. The report is grouped on orderno. The detail band has alias orderdtl. The report at the end has totals for fields from orderdtl and orderhdr table. The totals for table orderdtl are correct but the totals of orderhdr are multiplied by the numer of records in that order.
>>
>>Rajesh
>
>Report variables or expressions you mark as SUM are processed once for each detail record. However, here's a trick to get what you want:
>
>- Create a report variable called rnTotal, set the initial value to 0, the value to store to 0, and the calculate option to SUM
>
>- In the On Exit Expression of the Data Group Footer band, use the following:
>
>
>_VFP.SetVar('rnTotal', rnTotal + orderhdr.totalamt)
>
>
>- In your summary band, use rnTotal as the expression to print and do not put any calculate options on it. Just print it as is.