Hi AllI'm having some trouble with looking up a value in a dataset. In dataset1, I've got a running total:=Sum(Max(Fields!Amount.Value,"Group3"))If you consider there are 3 tables in dataset1, table a, b & c, where there are 1 to many relationships between all of them, the field I've summed above is from table b, and I've summed it in such a way to prevent multiplying the field by the no. records in table c. Hope you're all following...I've grouped the report by a field in table c; a big case statement which gathers records and lumps them into some more manageable group names. The problem occurs when records don't exist in table c for certain group names, the group name doesn't display in the tablix (which is to be expected). However, against each of these group names is an amount I want to display (which for now I'm using a simple IIF group name = "X" then amount to display). So, I'm trying to force these groups to show, and to do this I've created dataset2 which consists of a full list of the possible group names I've used in the case statement in dataset1:with mytable as (select 'groupname1' as Group,union all select 'groupname2',union alletc.....So, with all that in mind, how do I then retrieve/lookup the value of the formula in bold above? Where I've used the Lookup function in the past, it's been relatively simple because I'm either looking up a field within a different dataset, or the dataset I'm looking up from consists of a similar sql query/data structure. In this instance however, dataset2 contains none of the tables used in dataset1 (so I can't group a tablix and Lookup an expression based on the same tablix groupings).Does any of that make sense? Any help at all is much appreciated!ThanksRich
↧