Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Crystal Report-Get Value base on row criteria

$
0
0

I have a crystal report that when run will look like the below. The fields are place in the detail section:

Code|Jan|Feb|Mar|Apr|May|Jun|Jul|
405 |70 |30 |10 |45 |5  |76 |90 |
406 |10 |23 |30 |7  |1  |26 |10 |
488 |20 |30 |60 |7  |5  |44 |10 |
501 |40 |15 |90 |10 |8  |75 |40 |
502 |30 |30 |10 |7  |5  |12 |30 |
600 |60 |16 |50 |7  |9  |75 |20 |

I need to create a formula or a parameter to check if the Code=501 and then return the column Jun value of "75" from the footer section. I wrote this formula:

  whileprintingrecords;
  NumberVar COSValue;

  If {ds_RevSBU.Code}=501
  Then COSValue :={ds_RevSBU.JUN)}
  Else 0;

If I place this formula within the detail it work, it give me the value of 75. How can I get this value from the report footer section? Please help. Thank you.


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>