2012-12-20 5 views
0

Visual Studio Crystal 보고서에서 수식을 합산하려고하지만 그룹 수준에 대해서만 계산하려고합니다.VS Crystal Reports의 수식을 계산할 수 없습니다.

저는 계약과 Ancillary_Charge의 일대 다 관계가 있습니다. Contract.Cost를 합치려고 노력하고 있지만 각 ancillary_charge도 표시합니다. 그래서 나는 CONTRACT.ID를 하나의 그룹으로 세우고 각각의 부수적 인 요금을 세부 사항으로 설정했습니다.

다음

은 그룹 수준에있는 경우 ShowPrice에 대한 공식은 파악 IsZero

({PAYMENT_TYPE.ID} = 1) and IsNull({CHARGE_STATUS.PAYMENT_STATUS}); 

에 대한 ChargePrice

if ({@IsZero} or {@ShowPrice} = false) then 0 else {CONTRACT.CONTRACT_COST} 

공식 내 공식입니다 및 반환 true 또는 false

Global booleanvar thingy; 
Global booleanvar otherthingy; 

if (isNull({@Previous}) and thingy = false) then 
    thingy := true 
else 
    thingy := false; 

if otherthingy then 
    thingy := true; 
otherthingy := false; 

if (isNull({@Previous}) = false and next({CONTRACT.ID})<>{CONTRACT.ID}) then 
    otherthingy := true; 

thingy 

나는 ChargePrice를 합산하려고 시도 할 때 "이 필드는 요약해라. "

왜? 그리고 내가 할 수있는 일을 할 수 있습니까? 즉, 합계에 더하기 만하면됩니다.

답변

1

크리스탈을 합산하는 대신에 직접하십시오.

이 개 추가 공식

fmlReset

Global NumberVar Total; 
Total:=0; 

fmlDisplay 만들기

Global NumberVar Total; 
Total 

변경하여 chargeprice 공식

Global NumberVar Total; 
if ({@IsZero} or {@ShowPrice} = false) then 
0; 
else 
Total:=Total+{CONTRACT.CONTRACT_COST}; 

fmlReset을 페이지 보고서 머리글에 넣거나 합계를 재설정하려는 경우. fmlDisplay를 합계를 표시 할 위치에 배치하십시오.

관련 문제