Jasper iReport - how to call a subdataset with parameter using a variable expression?
===

I need a variable expression that calls a sub dataset with a parameter attached.

I have a dataset which is returning a list of grocery purchases made.  Something like: 

    Milk, NJ, $1.23
    
    Chicken, DE, $5.45
    
    Milk, NY, $1.44

I am able to get a sum of the prices using a summation variable on the purchase price.  However, I need a total that takes the state tax into account.  In the above example, let's say the NJ sales tax multiplier is 1.06 and NY sales tax is 1.08.  Instead of my milk sum being 2.76 (=1.44 + 1.23), I need it to be 2.859 (=1.23*1.06 + 1.44*1.08). 

I have a subdataset `SALES_TAX` that with the query `SELECT tax_multiplier FROM mydb.sales_tax WHERE state=$P{STATE}`.  

and I essentially need:

    Sum($F{PURCHASE_PRICE} * $V{getTax($F{PURCHASE_STATE)})

How can I accomplish this?  What will my getTax variable need to look like to query the SALES_TAX sub dataset with the purchase state field from the main dataset?

Thank you!