I am new to SSRS reporting so bare with me. I am trying to get an aggerate total from setting up a report variable in SSRS. I then need this total to use in another expressoin to come up with a percentage. When I use the field that starts with first it gives me and error the virables(grandtotal) vaue expresson for the report body uses aggregate function first, last or previous. Thes aggregate functions cannot be used in varible value expressions. If i use a summary field it tells me I believe that you can't use a summary field in a variable. I got by setting up another dataset and in the query I use the left function to just look at the first character of the class field to get the total for all non-exempt records. I set the sequel statement to just total for all records that the class begins with a value less than '7' then I put a summary on the assessment field. The class number start with 301 and go up to 504 for non-exemp properties. The exempt properties class start at 710. I included the code below for the report variable that I was trying to set up I thought setting up a varible was the correct way of getting the aggegate total instead of adding another dataset. If I have to use the dataset way I will need to add another one for exempt properties.
lue, "nonExemptClass"))< '7',
I also included a screen shot of the fields.