crystal-reportscrystal-reports-formulas

Conditional formula SUM in Crystal Reports does not work


I am making a custom sum formula in my Crystal Report. The key is to sum records when another cell has a specific value. For example... I have 2 rows with 3 records for each. If the value in the first row is 1 in two records, I want to sum those 2 records in the other row. You can find my example which is not working. Regards.

if {sp_rptInternal;1.Tax_Rate_Percentage}=10.00
then 
Sum ({sp_rptInternal;1.Sell_Price})

UPDATE 1: Values(bold) from the red rectangle needed to be placed inside my custom table below. UPDATE 2: I tried grouping with Image 2 and 3, but it is not working.

Image 1.

enter image description here

Image 2.

enter image description here

Image 3.

enter image description here


Solution

  • The only possible way is to make shared/global variables which can be used anywhere, in every section of the report, dynamically. Source can be provided from code-behind or via formula.