I have two datasets: Dataset1 (primary) and Dataset2. My report dataset is Dataset1.
I want to access Gross premium Amount from Dataset2 and put it in the report. The report is working just fine if the parameter for "market name" is a single value parameter.
When I set the parameter properties to "Allow Multiple Values", my report is displaying wrong Totals for "Production" Field. The problem is because the lookupset function is based on Currency_Type.
What I should do is search for each Market Name and for each currency type, then search for the appropriate Gross Premium in second dataset and return the value.
Dataset1:
Market Name Currency Type Receivable
Dataset2:
Company Name2 Currency Type1 Gross Premium Amount
The results should be like this:
Market Name Currency Type Receivable Gross Premium Amount
I used this code if to search for one value:
=code.SumLookup(LookupSet(Fields!Currency_Type.Value, Fields!Currency_Type1.Value,Fields!Gross_Premium_Amount.Value, "DataSet2"))
What should I do if I want the lookupset based on Market Name and Currency Type combined?